LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
DS DS is offline
external usenet poster
 
Posts: 117
Default 1004 Error on Workbooks.Open when run from inside IE

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open all workbooks inside a folder, run macro and save them? Pman Excel Programming 5 September 24th 07 04:32 PM
Unexpected error 1004 when using workbooks.open AHD Excel Programming 5 June 6th 05 11:19 PM
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 Frank Jones Excel Programming 2 June 15th 04 03:21 AM
excel workbooks.close returns 1004 error keith Excel Programming 0 September 26th 03 01:05 PM
Error 1004 when I open a file Deer Hunter Excel Programming 3 August 27th 03 05:33 PM


All times are GMT +1. The time now is 04:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"