Embedded excel spreadsheet will not update when form is opened

C

Cameron

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top