Passing Variables in Visual Basic for Applications Macros (140033)
The information in this article applies to:
- Microsoft Excel 97 for Windows
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 5.0
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q140033 SUMMARY
When you use a Microsoft Visual Basic for Applications macro or procedure,
you can retain the value of a variable by doing any of the following:
- Pass the variable to another workbook. (This way you can retain the
value of the variable, even if the original workbook is closed.)
- Pass the variable as an argument within the same workbook. (You can do
this without making the variable public.)
- Define the variable as a public variable.
Each of these methods is discussed in more detail in the "More Information"
section of this article.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbdtacode kbhowto kbProgramming KB140033 |
---|
|