OLE unbound object problems

C

Cameron

I have several forms with embedded OLE excel spreadsheets and when the user
selects a specific date range a query builds the table which in turn also
opens the form for the particular pivot table the user would like to see.
This calls the OLE object but doesn't force the object to update the query
and pull new data. How do I write the calling code in order to get the object
to automatically refresh the data?

The code calling the OLE object is as follows:

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