Have managed to open an Excel file via Access by using GetObject. Code as follows.....
Set ExcelWorksheet1 = Nothing
Set ExcelWorksheet1 = GetObject("c:\bpm-teamlead\performance\Performancemacdata\pmac220502.xls")
ExcelWorksheet1.Activate
ExcelWorksheet1.Application.Visible = True
I want the code in pmac220502.xls to run as soon as it is opened. I have started with Auto_open.
However, GetObject doesn't seem to open it as it is minimised and greyed out which is why I put in the line "ExcelWorksheet1.Activate". This has given it the focus but of course Auto_open doesn't run as it as already opened by the GetObject command.
Really confused and would appreciate advice
Angie
Set ExcelWorksheet1 = Nothing
Set ExcelWorksheet1 = GetObject("c:\bpm-teamlead\performance\Performancemacdata\pmac220502.xls")
ExcelWorksheet1.Activate
ExcelWorksheet1.Application.Visible = True
I want the code in pmac220502.xls to run as soon as it is opened. I have started with Auto_open.
However, GetObject doesn't seem to open it as it is minimised and greyed out which is why I put in the line "ExcelWorksheet1.Activate". This has given it the focus but of course Auto_open doesn't run as it as already opened by the GetObject command.
Really confused and would appreciate advice
Angie