B
brotherescott
I have a macro in Outlook 2003 that starts up Excel 2003 and loads a
workbook. I want to then, from Outlook call a Excel macro and send it
some variables. I followed the application.Run example in the help but
I still recieve a Runtime Error: 424 Object required.
Does anyone know what I am doing wrong in passing the variables?
'Outlook Macro
Sub StartExcel()
Dim xlApp As Object
Set xlApp = CreateObject("excel.application")
xlApp.Visible = True
a = "Test Text"
Set EBook = xlApp.workbooks.Add("C:\temp\book1.xls")
mySum = AxlApp.Run("book1.xls!macro1", a)
xlApp.Quit
Set xlApp = Nothing
End Sub
'Macro in Excel
Sub Macro1(a As String)
MsgBox a
End Sub
THanks
Scott
workbook. I want to then, from Outlook call a Excel macro and send it
some variables. I followed the application.Run example in the help but
I still recieve a Runtime Error: 424 Object required.
Does anyone know what I am doing wrong in passing the variables?
'Outlook Macro
Sub StartExcel()
Dim xlApp As Object
Set xlApp = CreateObject("excel.application")
xlApp.Visible = True
a = "Test Text"
Set EBook = xlApp.workbooks.Add("C:\temp\book1.xls")
mySum = AxlApp.Run("book1.xls!macro1", a)
xlApp.Quit
Set xlApp = Nothing
End Sub
'Macro in Excel
Sub Macro1(a As String)
MsgBox a
End Sub
THanks
Scott