+ Reply to Thread
Results 1 to 4 of 4

Open Excel Template in New Session

  1. #1
    Registered User
    Join Date
    10-10-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003, 2007 & 2010
    Posts
    88

    Open Excel Template in New Session

    I have created an interactive form in VBA which removes all menus and command bars when macros are enabled, and handed this over to our IT team. In turn, the IT team have placed the form in Templates over our Network.

    But, many users are facing the problem of all of their other open Excel documents also lossing menus and command bars once the macros in the template are activated.

    Ideally, it would be great to have the Template open in a brand new session of Excel so that it doen't cause any other open documents any grief.

    I didn't realise that the form was going to be distributed via templates, and thought that each relevant user would get their own copy, so now I have to find a solution, like yesterday a couple of years ago.

    At my wit's end, and any help will go greatly towards preserving what little sanity I still have remaining.
    Last edited by davesexcel; 01-13-2011 at 11:04 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Open Excel Template in New Session

    You obviously have a code that reactivates the menus and command bars when you close the workbook.
    It may be a good idea to place that code in the workbook module such as
    Please Login or Register  to view this content.
    Then of course the code to remove the menus and tool bars will have to be run when you activate the workbook again.
    Please Login or Register  to view this content.
    If it is a named VBA code in a regular module, you would just have to call the code for each action.
    Last edited by davesexcel; 01-13-2011 at 10:33 PM.

  3. #3
    Registered User
    Join Date
    10-10-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003, 2007 & 2010
    Posts
    88

    Re: Open Excel Template in New Session

    Believe it or not Dave, that's exactly what I was just trying to do, but commands like :

    Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"", TRUE/FALSE)"
    Application.DisplayFullScreen = True/False
    Application.CommandBars("Worksheet Menu Bar").Enabled = True/False

    are all refusing to be nice.

  4. #4
    Registered User
    Join Date
    10-10-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003, 2007 & 2010
    Posts
    88

    Re: Open Excel Template in New Session

    Got it. Created Functions in one of the Modules and used Run in the Workbook_Activate/Deactive event handlers to get them to work......had to reorder some of the commands as I think some were cancelling others out.

    Thank you for confirming that I was on the right track, Dave....it's amazing what can be accomplished out of desperation!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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