Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Organization & Variable Scope

Status
Not open for further replies.

slwolf8

Technical User
Joined
Apr 23, 2001
Messages
82
Location
US
(I am new to VBA)

I wrote a program that accepts some information from users and then creates a document, a post card, and a mailing label. Currently, I have different procedures for each of those. Is it ok to organize it that way and use public variables? I ask because I understand public variables should be used sparingly. Is there a better way to organize this? Should I be using modules (I don't know much about module use).

Thanks!
 
Hi Slwolf8,

Modules are OK. If you are nervous about your public variables than you could set them as 'static values', using a general workbook that always operates in the background where you have your code writing down values, you can call at any time.

Agathe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top