Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open all workbooks inside a folder, run macro and save them? | Excel Programming | |||
Unexpected error 1004 when using workbooks.open | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
excel workbooks.close returns 1004 error | Excel Programming | |||
Error 1004 when I open a file | Excel Programming |