I want to display an excel document on an ms-access form and refresh it after editing.
I assumed i need to use an unbound object frame.
In design mode, i create the unbound object frame and i point to my document and check the box that says linked.
The checkbox says:
"Inserts a picture of the file contents into your document. The picture will be linked to the file so that changes to the file will be reflected in your document."
I have created a button on my form.
In the onClick routine, I run the following code to edit the document that was linked to the Unbound Object Frame.
Code:
set objExcel = CreateObject("EXCEL.Application")
objExcel.Workbooks.Open (sMyDocumentPath)
objExcel.Cells(1,1) = "abc"
objExcel.ActiveWorkbook.Close SaveChanges:=True
objExcel.Application.Quit
set objExcel = nothing
Now i want the displayed excel document in the Unbound Object Frame to update the picture to display my updates. Can someone tell me how that is done?