+ Reply to Thread
Results 1 to 14 of 14

Need assistance with Opening and closing Excel-document

  1. #1
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Need assistance with Opening and closing Excel-document

    Hi,

    I have the following scenario: When you open Excel a messagebox appears, when you press "OK" I want the Excel-document to close and re-open.

    NOTE: I do NOT only want the workbook to close and open. I want the whole document to restart.

    I have the following code, but it only closes the workbook ( It does not open it), and therefor I need help.

    Please Login or Register  to view this content.
    Regards,

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Need assistance with Opening and closing Excel-document

    What do you mean the 'whole document'?

    Isn't the workbook the whole document?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Need assistance with Opening and closing Excel-document

    When I say "whole document" I mean pressing the red X in the top right corner.

    Thank you norie.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Need assistance with Opening and closing Excel-document

    Do you mean quit the Excel application?

  5. #5
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Need assistance with Opening and closing Excel-document

    Yes that is what I mean.

  6. #6
    Registered User
    Join Date
    08-19-2014
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    2010
    Posts
    45

    Re: Need assistance with Opening and closing Excel-document

    Try:

    Please Login or Register  to view this content.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Need assistance with Opening and closing Excel-document

    RinorM

    Where are you running the code from?

  8. #8
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Need assistance with Opening and closing Excel-document

    Hi I tried your solution but it came up the following message: "Object needed" then it highlighted the x=.

    Regards,

  9. #9
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Need assistance with Opening and closing Excel-document

    I am running this code from my module1.

    Regards,

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Need assistance with Opening and closing Excel-document

    So you are running it from Excel?

    Do you want to open the workbook in a new instance of Excel?

  11. #11
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Need assistance with Opening and closing Excel-document

    Yes I am running it from Excel. When the Workbook opens a messagebox appears, after you press "OK" then I want the workbook to restart in a new instance.

    Regards,

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Need assistance with Opening and closing Excel-document

    So, you want to open the workbook in the current instance of Excel, then after the OK button is pressed close the workboo and re-open it in a new instance of Excel?

  13. #13
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Need assistance with Opening and closing Excel-document

    Yes that is correct.

    Regards,

  14. #14
    Forum Contributor
    Join Date
    04-28-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Need assistance with Opening and closing Excel-document

    Do you know how?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Opening, Closing, and Opening Excel workbooks from MS Project
    By m007schneider in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2013, 03:22 PM
  2. Assistance with getting details without opening Excel
    By derivs1 in forum Excel General
    Replies: 0
    Last Post: 06-22-2009, 11:36 PM
  3. Closing and re-opening the same file in excel
    By thompsy121 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 10-19-2008, 09:11 AM
  4. Opening/closing Excel
    By Bart van der Ve in forum Excel General
    Replies: 0
    Last Post: 06-12-2007, 12:18 PM
  5. Trouble closing MS Word document from Excel macro
    By Cumberland in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2007, 01:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1