When I try to pass arguments to a macro which can accept arguments , it will not accept them under any circumstances , it runs fine when I don't try to pass any arguments . Is there anyway that I can pass arguments to a macro in an Excel OLE object .
Set objXL = CreateObject("Excel.Application"
With objXL.Application
.Visible = True
.ScreenUpdating = False
.Workbooks.Open prepfile
.Run (macroname)
'This will not work
'.Run (macroname,upl_filename)
.Quit
End With
Set objXL = Nothing
Set objXL = CreateObject("Excel.Application"
With objXL.Application
.Visible = True
.ScreenUpdating = False
.Workbooks.Open prepfile
.Run (macroname)
'This will not work
'.Run (macroname,upl_filename)
.Quit
End With
Set objXL = Nothing