S
SidBord
It sounds like you could make use of a "static" variable.
This is kinda clutzy, but it should work. In the module
that contains all macros that might need to reference the
last workbook, enter "Dim LastWkBkNo As Integer" at the TOP
of the module BEFORE the first Sub statement. That should
make the variable available to all procedures. You can
store whatever you want to in it, but it sounds like the
value of "i" might be a good choice. Or make it a string
variable and store the full name of the workbook.
This is kinda clutzy, but it should work. In the module
that contains all macros that might need to reference the
last workbook, enter "Dim LastWkBkNo As Integer" at the TOP
of the module BEFORE the first Sub statement. That should
make the variable available to all procedures. You can
store whatever you want to in it, but it sounds like the
value of "i" might be a good choice. Or make it a string
variable and store the full name of the workbook.