D
David
I am trying to run a macro from file1 on a second file,
file2. Here is the code I am trying to run...
'**********************************************************
************
' Visual Basic ActiveX Script
'**********************************************************
**************
Function Main()
Dim Excel_Application
Dim Excel_Application2
Set Excel_Application = CreateObject
("Excel.Application")
Set Excel_Application2 = CreateObject
("Excel.Application")
' Open the workbook specified
Excel_Application.Workbooks.Open("c:\Test.xls")
Excel_Application2.Workbooks.Open
("c:\PersonalMacros.xls")
Excel_Application.Run "c:\PersonalMacros.xls!
ReplaceCommas"
'Clean Up our Excel Objects
Excel_Application.Quit
Set Excel_Application = Nothing
Excel_Application2.Quit
Set Excel_Application2 = Nothing
Main = DTSTaskExecResult_Success
End Function
Any help would be greatly appreciated.
file2. Here is the code I am trying to run...
'**********************************************************
************
' Visual Basic ActiveX Script
'**********************************************************
**************
Function Main()
Dim Excel_Application
Dim Excel_Application2
Set Excel_Application = CreateObject
("Excel.Application")
Set Excel_Application2 = CreateObject
("Excel.Application")
' Open the workbook specified
Excel_Application.Workbooks.Open("c:\Test.xls")
Excel_Application2.Workbooks.Open
("c:\PersonalMacros.xls")
Excel_Application.Run "c:\PersonalMacros.xls!
ReplaceCommas"
'Clean Up our Excel Objects
Excel_Application.Quit
Set Excel_Application = Nothing
Excel_Application2.Quit
Set Excel_Application2 = Nothing
Main = DTSTaskExecResult_Success
End Function
Any help would be greatly appreciated.