A
avi
Hello,
I have encapsulated a piece of code in an EXE file and use it to
create a specific sheet in the active workbook [The code: RetVal =
Shell("C:\word\EzPaste©\exempledll\ActiveWbk.exe")].
The first time i refer to the specific sheet created, i get an
"subscript out of of range" error. But just after that, the sheet is
recognized.
When i put a MsgBox just after the RetVal, the sheet is recognized in
the first time.
When i use directly the encapsulated code in VBA. it works the first
time.
Could you help explaining what happens and how to overcome the
problem?
Thanks a lot
Avi
I have encapsulated a piece of code in an EXE file and use it to
create a specific sheet in the active workbook [The code: RetVal =
Shell("C:\word\EzPaste©\exempledll\ActiveWbk.exe")].
The first time i refer to the specific sheet created, i get an
"subscript out of of range" error. But just after that, the sheet is
recognized.
When i put a MsgBox just after the RetVal, the sheet is recognized in
the first time.
When i use directly the encapsulated code in VBA. it works the first
time.
Could you help explaining what happens and how to overcome the
problem?
Thanks a lot
Avi