Hello there,
From Access, I want to open an excel sheet and run a sub (which is activated by a button in excel). The sheet opens without a problem but seems that I'm unable to have the Sub run (Access 11.0 object library checked). I always get "The macro 'UpdateReport_Click' cannot be found.
From Access, I want to open an excel sheet and run a sub (which is activated by a button in excel). The sheet opens without a problem but seems that I'm unable to have the Sub run (Access 11.0 object library checked). I always get "The macro 'UpdateReport_Click' cannot be found.
Code:
Set objXL = CreateObject("Excel.Application")
Set xlWB = objXL.Workbooks.Open(LastFileName)
objXL.Visible = True
objXL.Application.Run "UpdateReport_Click"