R
rju
I have the following VBA code in Word:
Dim xls As Object
Dim wrk As Excel.workbook
Dim xlfilename As String
xlfilename = "C:\QtestExcel.xls"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set wrk = xls.workbooks.Open(xlfilename)
Application.Run "xlfilename!AggregateFileDocs"
when I run the routine I get "Unable to run the specified macro." Am
referencing the macro incorrectly? I know that WB opens correctly...th
macro does work in Excel, I executed it manually when the WB opened...
also tried
Application.Run "QtestExcel!AggregateFileDocs"
that didn't work either. Thoughts?
Thanks,
Ro
Dim xls As Object
Dim wrk As Excel.workbook
Dim xlfilename As String
xlfilename = "C:\QtestExcel.xls"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set wrk = xls.workbooks.Open(xlfilename)
Application.Run "xlfilename!AggregateFileDocs"
when I run the routine I get "Unable to run the specified macro." Am
referencing the macro incorrectly? I know that WB opens correctly...th
macro does work in Excel, I executed it manually when the WB opened...
also tried
Application.Run "QtestExcel!AggregateFileDocs"
that didn't work either. Thoughts?
Thanks,
Ro