Declaring Variables once for Entire VBA Project

Declaring Variables once for Entire VBA Project

Anonymous
Not applicable
529 Views
5 Replies
Message 1 of 6

Declaring Variables once for Entire VBA Project

Anonymous
Not applicable
Is there a way to declare variables once, for an entire project? If I am using the same variable in a lot of forms i do not want to declare it everywhere.
0 Likes
530 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
declare your variable(s) as Public in a Code module.

Im assuming the variables you are referring to have to do with autocad, or something in-house, but do NOT refer to things actually having to do with a form/interface. If the latter is the case, youll *want* individual copies of each variable.
0 Likes
Message 3 of 6

Anonymous
Not applicable
I am wanting to declare variables for AcadEntity and AcadBlockReference to name a few (there are several)....the same variable i am setting is used in several forms....you are suggesting a create a "CODE" module?
0 Likes
Message 4 of 6

Anonymous
Not applicable

A standard .bas file using Public or Global
variables [do not create them in any of your Form modules].

 

Joe ...

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
am wanting to declare variables for AcadEntity and AcadBlockReference to name
a few (there are several)....the same variable i am setting is used in several
forms....you are suggesting a create a "CODE" module?
0 Likes
Message 5 of 6

Anonymous
Not applicable
Hi Joe, Any Plans for an Acad2009 release of your VBA Book? I have both the 06 and 04 versions
0 Likes
Message 6 of 6

Anonymous
Not applicable

No, but I have been working on some .NET
material.

 

Joe ...

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi
Joe, Any Plans for an Acad2009 release of your VBA Book? I have both the 06
and 04 versions
0 Likes