# Locating variables in nested modules

**URL:** <https://community.wolfram.com/t/locating-variables-in-nested-modules/18330>\
**Category:** Questions\
**Created:** [June 23, 2021, 1:20pm UTC](https://community.wolfram.com/t/locating-variables-in-nested-modules/18330 "2021-06-23T13:20:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ejeh](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/ejeh/32/9140_2.png) [@ejeh](https://community.wolfram.com/u/ejeh)\
**Post date:** [June 23, 2021, 1:20pm UTC](https://community.wolfram.com/t/locating-variables-in-nested-modules/18330/1 "2021-06-23T13:20:50Z")

</div>

This code works.

```
Module [{x1, x2},
  Module [{},
   x1 = "111";
   ];
  Module [{},
   x2 = "222";
   ];
  Row [{x1, "-", x2}]
  ]

```

The same code separated into three attachments does not work.  
What am I doing wrong? What is the solution?  
Thanks a lot.

[pp0.nb](https://community.wolfram.com/uploads/short-url/tyRBTGyKNPT5qkxJZvZPKIfHNQh.nb) (3.65 KB)  
[pp1.nb](https://community.wolfram.com/uploads/short-url/wNSy8e7uheiF9ppw59wdWRHJOfF.nb) (1.57 KB)  
[pp2.nb](https://community.wolfram.com/uploads/short-url/6KXy907aO4bwQpIft679iOnaFr3.nb) (1.49 KB)

---

<div class="post-metadata">

**Author:** ![mikebesso](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mikebesso/32/22282_2.png) [@mikebesso](https://community.wolfram.com/u/mikebesso)\
**Post date:** [June 23, 2021, 2:57pm UTC](https://community.wolfram.com/t/locating-variables-in-nested-modules/18330/2 "2021-06-23T14:57:42Z")

</div>

Check out the “possible issues” section of the documentation for NotebookEvaluate[]. It looks like you might have to set the context.
