B
Bill R via AccessMonster.com
I have the following code at the end of a procedure that pastes new data in
an Excel workbook:
Set objXL = New excel.Application
With objXL
.Visible = True
Set objWkb = .Workbooks.Open(strPath)
objWkb.Save
End With
Set objWkb = Nothing
Set objXL = Nothing
It works fine, except, now that the company upgraded me to Excel 2003, the
focus remains in Access after the code runs. In Excel 2000, after the code
ran, the Excel workbook would open and get the focus. This is problematic
because sometimes you'll get a dialog (refresh links, etc.) when the workbook
opens, but that's not apparent unless the workbook has the focus.
Bill
an Excel workbook:
Set objXL = New excel.Application
With objXL
.Visible = True
Set objWkb = .Workbooks.Open(strPath)
objWkb.Save
End With
Set objWkb = Nothing
Set objXL = Nothing
It works fine, except, now that the company upgraded me to Excel 2003, the
focus remains in Access after the code runs. In Excel 2000, after the code
ran, the Excel workbook would open and get the focus. This is problematic
because sometimes you'll get a dialog (refresh links, etc.) when the workbook
opens, but that's not apparent unless the workbook has the focus.
Bill