Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you're using Run, you don't include the path name of the file, only the
file name (e..g, "Book1.xls" not "C:\Test\Book1.xls"). Excel cannot have two workbooks with the same file name open at the same time, so the Path is irrelevant. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "David" wrote in message ... Code: Sub Chap7() ' Macro4 Macro Dim FileName As String z = 1 x = 0 Debug.Assert z < 0 Debug.Assert x < 0 On Error Resume Next v = z / x If Err.Number < 0 Then Result = Application.Run("C:\Documents and Settings\Owner\MyDocuments\Excel\VBA\Excel2003VBA! ErrorInformation", _ Err.Number, Err.Source, Err.Description, ActiveWorkbook.Name) End If (Trying to get above what is produced by below) 'If Err.Number < 0 Then ' Msg = "Error # " & Str(Err.Number) & " was generated by/ " _ ' & Err.Source & Chr(13) & Err.Description & "/ " & ActiveWorkbook.Name ' MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext 'End If End Sub Tried to use a Call, but was not allowed, so I am trying to do a Run. -- David |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to get userform Cancel button to invoke Exit Sub in calling macro? | New Users to Excel | |||
Excel invoke REST service function with Xpath fn parse result! | Excel Worksheet Functions | |||
Calling a Public Subroutine in a Different Workbook | Excel Programming | |||
invoke a function | Excel Programming | |||
Auto invoke of a VBA Sub function | Excel Programming |