Results 1 to 2 of 2
  1. #1
    milovisk is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    1

    Problem when opening excel .xlsm file from Access button

    I have created a button to open an excel spreadsheet, if I run the code in the vba editor it opens the spreadsheet and displays it, however when I click the button it opens the spreadsheet but stays on the access page. I then need to click on the excel tab on the bottom of windows 7 to view the spreadsheet. Can anyone help in solving this problem.



    Below is the event code assigned to the button

    Sub Product_555x()
    Dim appexcel As Object
    Set appexcel = CreateObject("Excel.Application")
    appexcel.workbooks.Open "c:/products/templates/Product 555x.xlsm"
    appexcel.Visible = True



    End Sub

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Is the form where you have the command button have the Modal property = True, or if opening with VBA, does the OpenForm command specify dialog mode when opening?

    Either one could cause this issue.

    HTH

    John

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

Similar Threads

  1. Problem opening file, Error 3197
    By mmad57 in forum Security
    Replies: 11
    Last Post: 01-24-2013, 08:06 AM
  2. create a button for import excel file
    By tggsun in forum Forms
    Replies: 3
    Last Post: 01-17-2012, 08:40 AM
  3. XLSM in Access
    By xsbucks in forum Access
    Replies: 5
    Last Post: 12-20-2011, 02:31 PM
  4. problem opening .mdb file
    By honeybee in forum Access
    Replies: 7
    Last Post: 06-25-2010, 11:33 AM
  5. VBA Opening Excel File and Placing Data in Cells
    By BobTHG in forum Programming
    Replies: 0
    Last Post: 01-13-2008, 03:01 PM

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