I
intersection row and column
I want to run an Excel macro from Access.
This is the syntax used in Access :
Dim xls As Object, xwkb As Object
Dim strFile As String, strMacro As String
strFile = "PERSONAL.XLS"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set xwkb = xls.Workbooks.Open(Macro_Path & strFile)
strMacro = "importer_from_Reseachtool"
xls.Run strFile & "!" & strMacro
It works fine.
But now I need to run the same Excel macro with 2 arguments : the year and
the week number.
TheYear = 2008
TheWeek = 26
What is the syntax ?
something like : xls.Run strFile & "!" & strMacro (theYear, TheWeek) ????
of course that doesn't work !!!
thanks for your help
This is the syntax used in Access :
Dim xls As Object, xwkb As Object
Dim strFile As String, strMacro As String
strFile = "PERSONAL.XLS"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set xwkb = xls.Workbooks.Open(Macro_Path & strFile)
strMacro = "importer_from_Reseachtool"
xls.Run strFile & "!" & strMacro
It works fine.
But now I need to run the same Excel macro with 2 arguments : the year and
the week number.
TheYear = 2008
TheWeek = 26
What is the syntax ?
something like : xls.Run strFile & "!" & strMacro (theYear, TheWeek) ????
of course that doesn't work !!!
thanks for your help