I have a module and in the Declaration Section I am declaring about 4 variables as Public. This works fine, allows me to pass variables to functions that I call etc etc. The problem that I have now is that I used the same variable name throughout multiple modules. For example in Module 1 I named a variable fileName1, well declaring it Public fileName1 in my Declaration Section is now throwing an ambiguous name detected compile error. To my understanding I need to keep the variable as Public in order to pass the data to the functions I am calling. Do I just need to go through and rename all my variables to different names so that no 2 variables share the same name regardless of what module they are in, or is there another workaround that can rectify this?
I named the variable the same regardless of which module they were in for the fact that I plan to call the functions in numerous modules and just want to pass the variable fileName to the function and have the commands run! I am trying to cutdown on code writing, but I may have totally blown up my coding.
Bookmarks