Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Embedded excel spreadsheet will not update when form is opened

Geek News

Embedded excel spreadsheet will not update when form is opened
Cameron 12/5/2008 4:21:01 PM
I have a number of forms that have embedded excel spreadsheets in them. I
took over modifying these forms and apparently they use to automatically
update when the form was opened. But now with the new excel spreadsheets in
them they will not do that. How to I programically force the spreadsheet to
update when the primary calling form gets updated or changed?

The following is the code in the background that calls the OLE object on one
of the forms where it is embedded.

Option Compare Database
Option Explicit

Private Sub btnEdit_Click()
On Error GoTo btnEdit_Err
Me!PivotTable.Verb = acOLEVerbOpen
Me!PivotTable.Action = acOLEActivate
btnEdit_Exit:
Exit Sub
btnEdit_Err:
MsgBox Error$
Resume btnEdit_Exit
End Sub

Private Sub Form_Load()
Call btnEdit_Click
End Sub

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net