Hi all!!
I need help, I have been stuck for a few days on this one. I am trying to open an excel table from a command button in Access. The excel table has an auto_open macro, that is supposed to run everytime I open excel.
When I navigate to the excel file, and open it, it autoruns the macro with no problems. When I go from Access hit the command, the excel table opens with no problem, but the macro does not auto run on start.
Here is the code I used to open my Excel table:
Dim appExcel As Object
Dim myWorkbook As Object
Set appExcel = CreateObject("E xcel.Applicatio n")
Set myWorkbook = appExcel.Workbo oks.Open("R:\Ra ilTrace (Mauricio)\DBs\ Rail Trace\MapExcelD ata.xls")
appExcel.Visibl e = True
Set appExcel = Nothing
Set myWorkbook = Nothing
Thank you in advance for your help.
I need help, I have been stuck for a few days on this one. I am trying to open an excel table from a command button in Access. The excel table has an auto_open macro, that is supposed to run everytime I open excel.
When I navigate to the excel file, and open it, it autoruns the macro with no problems. When I go from Access hit the command, the excel table opens with no problem, but the macro does not auto run on start.
Here is the code I used to open my Excel table:
Dim appExcel As Object
Dim myWorkbook As Object
Set appExcel = CreateObject("E xcel.Applicatio n")
Set myWorkbook = appExcel.Workbo oks.Open("R:\Ra ilTrace (Mauricio)\DBs\ Rail Trace\MapExcelD ata.xls")
appExcel.Visibl e = True
Set appExcel = Nothing
Set myWorkbook = Nothing
Thank you in advance for your help.
Comment