M
Martin in Frisco Texas
I am using a 2002 Excel workbook Aut
pen marco to run a macro in an
Addin.xla that I created. The workbook macro contains a procedure -
Range("WorkbookName") = ActiveWorkbookName - because the Addin is intended to
be used with workbooks with variable names. The Addin Marco that is called
from the Aut
pen macro contains the following procedure - WBFilename =
Worksheets("Calculations").Range("WorkbookName"). WBFileName is used in many
macros in the Addin to identify the workbook. At the point of such Addin
macro I get a message "Run-Time error '9': subscript out of range". When I
run the Aut
pen macro from the VBA menu "Run" the error does not happen,
and both macros work fine. Why do I get the error message? If you would
like, I can email a sample of these two macros. I have tried lots of ways to
solve this, but have not been successful.
Addin.xla that I created. The workbook macro contains a procedure -
Range("WorkbookName") = ActiveWorkbookName - because the Addin is intended to
be used with workbooks with variable names. The Addin Marco that is called
from the Aut
Worksheets("Calculations").Range("WorkbookName"). WBFileName is used in many
macros in the Addin to identify the workbook. At the point of such Addin
macro I get a message "Run-Time error '9': subscript out of range". When I
run the Aut
and both macros work fine. Why do I get the error message? If you would
like, I can email a sample of these two macros. I have tried lots of ways to
solve this, but have not been successful.