I am attempting to execute some excel macros from access. I have had it all run successfully with a single variable stored in the excel macros, but I would like to change a few variables from access and make them recognizeable in the excel macros. I believe this is very simple to someone that understands the public and private relationships of this stuff but I just can't get it to work. Here is the problem.
The variable 'strfieldman' isn't being passed to the excel macros so my sql statement in the macro is coming out blank. I don't know the term for what I am trying to do, that is why I haven't been able to figure this out. Thanks in advance.
Code:
Dim appXL As Excel.Application
Dim wbk As Excel.Workbook
Set appXL = New Excel.Application
Set wbk = appXL.Workbooks.Open("F:\Path")
With appXL.Application
strfieldman = "Ashlee"
.Run "'FIELDMEN Baker.xlsm'!UpdateList.UpdateList"
.Run "'FIELDMEN Baker.xlsm'!ImportIt"
.Run "'FIELDMEN Baker.xlsm'!SuddenChange"
End With
With appXL.Application
.Run "'FIELDMEN Baker.xlsm'!Mail"
End With