Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro in an XLA that is trying to run a macro in a different
workbook, if the macro does not exist, I just want to ignore it and continue, otherwise run it. It works fine if the macro exists, but if it doesn't I get the runtime 1004 error dialog box, and no matter what I do, I cannot seem to prevent it. Here is a sample of my code: Public Sub RunMacro( FileName ) On Error GoTo Finish Set ReportWorkbook = Workbooks.Open(FileName, , True) Application.Run ReportWorkbook.Name & "!Execute" On Error GoTo 0 Finish: End Sub Am I missing something here???? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trap a find error | Excel Programming | |||
Error Trap Not Working | Excel Programming | |||
Trap a DateValue Error | Excel Programming | |||
error trap | Excel Programming |