Results 1 to 3 of 3
  1. #1
    mayhem is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    4

    how to display excel document on ms-access form + refresh the display of it after it's been edited.

    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?

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I can't add anything other than what has been covered in the other forum. Seems to me you've given up on the link provided in post#2. You just said 'gives an error'. No description of what that error is so can't be taken any further. Link provided is https://docs.microsoft.com/en-us/off....UpdateOptions

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 01-12-2017, 10:35 AM
  2. Replies: 3
    Last Post: 10-28-2015, 12:38 PM
  3. Replies: 2
    Last Post: 04-06-2015, 12:08 PM
  4. Need to refresh form to display updated data
    By pledbetter in forum Forms
    Replies: 3
    Last Post: 01-02-2014, 01:20 PM
  5. Replies: 5
    Last Post: 10-19-2010, 08:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums