N
nxqviet
Hi
This is a referencing question. I have an Access file that will open an
excel file, then run a macro in that excel. I need to assign a value
(varVersion ) to a public variable in the excel file name PubText.
==============
Dim xls As Object, xwkb As Object
Dim strFile As String, strMacro As String
strFile = "Template.xls"
strMacro = "TextString"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set xwkb = xls.Workbooks.Open("C:\" & strFile)
Dim varVersion As Variant
varVersion = Forms!Test!Version.Value
xls.Run strFile & "!" & strMacro
.....Set PubText = varVersion ????? <------
======
Thanks,
V_
This is a referencing question. I have an Access file that will open an
excel file, then run a macro in that excel. I need to assign a value
(varVersion ) to a public variable in the excel file name PubText.
==============
Dim xls As Object, xwkb As Object
Dim strFile As String, strMacro As String
strFile = "Template.xls"
strMacro = "TextString"
Set xls = CreateObject("Excel.Application")
xls.Visible = True
Set xwkb = xls.Workbooks.Open("C:\" & strFile)
Dim varVersion As Variant
varVersion = Forms!Test!Version.Value
xls.Run strFile & "!" & strMacro
.....Set PubText = varVersion ????? <------
======
Thanks,
V_