Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2015, 12:34 AM
Officer_Bierschnitt Officer_Bierschnitt is offline Declaring a variable that is known across modules Windows 7 64bit Declaring a variable that is known across modules Office 2013
Advanced Beginner
Declaring a variable that is known across modules
 
Join Date: Oct 2015
Posts: 87
Officer_Bierschnitt is on a distinguished road
Default

Quote:
Originally Posted by shg View Post
You don't need a separate module, but it's a good idea. Just declaring them as Public is sufficient to make them visible throughout the project.



You just can't have another variable more local in scope with the same name.
I'll try. One project can encompass several modules, can't it? I was getting some error_messages in the 2nd module yesterday which led me to believe that my variables - already declared as PUBLIC in the 1st module - were not recognized there. Might have been something different, I'm still not very advanced.

Thanks a lot!

Best regards,

DataNibbler

P.S.: How would I have to do this with a separate module? I haven't found a specific How-to for this. Does there have to be a Sub() in there with the CALL-command for the next module?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge Berryblue Mail Merge 1 11-13-2014 05:36 PM
Declaring a variable that is known across modules Modelling training modules Vincent Project 3 09-03-2014 05:37 PM
Declaring a variable that is known across modules Run-time error 91 object variable or with block variable not set JUST ME Word VBA 4 03-25-2014 06:56 AM
Declaring a variable that is known across modules Empty Modules Greg S. Excel Programming 2 07-30-2013 01:38 PM
Declaring a variable that is known across modules Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft