Message 1 of 1
What kind of variables should be used?

Not applicable
11-24-2002
10:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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