Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
workbooks.open and error handling | 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 | |||
error on oXL.Workbooks.Open | Excel Programming | |||
excel workbooks.close returns 1004 error | Excel Programming | |||
Error 1004 when I open a file | Excel Programming |