LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
AHD AHD is offline
external usenet poster
 
Posts: 1
Default Unexpected error 1004 when using workbooks.open


I have what I thought was a fairly simple macro. This macro runs fine if
I step thru it in debug but gives me an error 1004 if I launch it from a
button from the sheet. Does anybody have any ideas? (I'm running Excel
2003 sp1 on windows XP pro 2002 sp1)

Sub PublishToIntranet()
'
'
'
On Error GoTo Err_Handler_Publish_To_Intranet
Range("A1:Q61").Select
Selection.Copy
ChDir "\\lrfp3\psm\intranetDocuments\dryer\dailyPlan "
workbooks.Open Filename:= _
"\\lrfp3\psm\IntranetDocuments\Dryer\DailyPlan\Dai lyPlan.xls"
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close
MsgBox "Page published to Intranet."
Exit Sub
Err_Handler_Publish_To_Intranet:
MsgBox "Unexpected error " & Err.Number & " " & Err.Description &
". Page not published. Please contact CIS", vbOKOnly
End Sub


--
AHD
------------------------------------------------------------------------
AHD's Profile: http://www.excelforum.com/member.php...o&userid=24033
View this thread: http://www.excelforum.com/showthread...hreadid=376445

 
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
workbooks.open and error handling John Keith[_2_] Excel Programming 5 August 18th 05 05:16 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
error on oXL.Workbooks.Open arieribbens Excel Programming 3 April 26th 04 10:09 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 10:59 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"