This article is from the Star Trek Tech FAQ, by Joshua Bell inexorabletash@hotmail.com with numerous contributions by others.
This is done in "Ship In A Bottle" [TNG]. They end up with a Holodeck
(in which Picard was in control, and sent Moriarty away) inside a
Holodeck (the real one, in which Moriarty took control) by the end of
the episode. Is there a limit? Probably. No evidence for what that
limit might be.
 
Continue to: