K
Kate
I am trying to run an excel macro from access. First I open the
spreasheet, then I run the macro.
This is my code:
Dim xlx As Object, xlw As Object, xls As Object, xlc As Object
Set xlx = CreateObject("Excel.Application")
xlx.Visible = True
Set xlw = xlx.Workbooks.Open("H:\Data\Enztec Files\1300 Marketing\04 -
Pricing\Price Lists and Costings\C Costing Database\Route Card
Template.xls")
Set xls = xlw.Worksheets("Route Card")
Dim strFile As String, strMacro As String
strFile = "Route Card Template"
strMacro = "RouteCard"
Set xlx = CreateObject("Excel.Application")
xlx.Visible = True
xlx.Run strFile & "!" & strMacro
But it won't run the macro? How Come?
Thanks
spreasheet, then I run the macro.
This is my code:
Dim xlx As Object, xlw As Object, xls As Object, xlc As Object
Set xlx = CreateObject("Excel.Application")
xlx.Visible = True
Set xlw = xlx.Workbooks.Open("H:\Data\Enztec Files\1300 Marketing\04 -
Pricing\Price Lists and Costings\C Costing Database\Route Card
Template.xls")
Set xls = xlw.Worksheets("Route Card")
Dim strFile As String, strMacro As String
strFile = "Route Card Template"
strMacro = "RouteCard"
Set xlx = CreateObject("Excel.Application")
xlx.Visible = True
xlx.Run strFile & "!" & strMacro
But it won't run the macro? How Come?
Thanks