What kind of variables should be used?

What kind of variables should be used?

Anonymous
Not applicable
149 Views
0 Replies
Message 1 of 1

What kind of variables should be used?

Anonymous
Not applicable
This is a philosophical question reguarding variables. Is it better to
re-define a variable for every sub and function, or would it be better to
define some of these variables as global? A good example of this could be:

Dim oDoc As Inventor.Document
Set oDoc = ThisApplication.ActiveDocument

oDoc is quite common for several of the functions. Is re-defining it better
then to just do it once during initializing the main macro?

Ed
0 Likes
150 Views
0 Replies
Replies (0)