D
DS
Morning all, and happy Wednesday.
Have a slightly bizarre one to ask you fine people about.
The following Workbooks.Open statement forms part of my code.
Workbooks.Open Filename:=TargetPath & TargetBook, Password:="xxx",
WriteResPassword:="xxxx"
where TargetPath & TargetBook are defined previously.
Now, when running this from within Excel itself, it works fine and opens the
desired workbook.
When running from within IE, I get a 1004 ("Method 'Open' of Object
'Workbooks' Failed") - but only when running as part of the full macro. If I
hit debug, it takes me to that line, and hitting F8 to re-run that line in a
fit of frustration sees it work perfectly, and open the required workbook.
Me no understand. Please save what remains of my hair and tell me why this
is happening, and, more importantly, how the *flipping heck* to stop it!!
thanks in advance,
Have a slightly bizarre one to ask you fine people about.
The following Workbooks.Open statement forms part of my code.
Workbooks.Open Filename:=TargetPath & TargetBook, Password:="xxx",
WriteResPassword:="xxxx"
where TargetPath & TargetBook are defined previously.
Now, when running this from within Excel itself, it works fine and opens the
desired workbook.
When running from within IE, I get a 1004 ("Method 'Open' of Object
'Workbooks' Failed") - but only when running as part of the full macro. If I
hit debug, it takes me to that line, and hitting F8 to re-run that line in a
fit of frustration sees it work perfectly, and open the required workbook.
Me no understand. Please save what remains of my hair and tell me why this
is happening, and, more importantly, how the *flipping heck* to stop it!!
thanks in advance,