+ Reply to Thread
Results 1 to 7 of 7

Show ribbon when switching workbooks

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    wigan
    MS-Off Ver
    2007
    Posts
    78

    Show ribbon when switching workbooks

    hi,

    I have a workbook that hides the ribbon, formula bar, etc on opening. What I would like to do is show all the hidden aspects when switching to another workbook, but when I go back to my workbook it hides everything again.

    My code to hide is:

    Please Login or Register  to view this content.
    thanks,
    dan

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. See rule #3. I have added code tags because you are still a new user. --6StringJazzer
    Last edited by 6StringJazzer; 01-09-2014 at 10:10 AM. Reason: code tags

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Show ribbon when switching workbooks

    You need to place this code in your workbooks event :

    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Show ribbon when switching workbooks

    Use the Workbook Activate / Deactivate events:

    Please Login or Register  to view this content.
    Oh, and please put your code in CODE tags...
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Registered User
    Join Date
    01-08-2014
    Location
    wigan
    MS-Off Ver
    2007
    Posts
    78

    Re: Show ribbon when switching workbooks

    Hi This works great thank you. however, I have the following code on a command button to close the work book and it now returns a "400" error when I click the ok box:

    Sub excelclose()
    If MsgBox("If you have made changes please ensure that a copy of this workbook has been saved in the client accounts folder for next year." & vbCr & vbCr & "Click OK to exit or cancel to return to the workbook and save.", vbOKCancel) = vbOK Then
    ActiveWorkbook.Saved = True
    Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",true)"
    ThisWorkbook.Close
    Else
    End If
    End Sub

    thanks again in advance.

  5. #5
    Registered User
    Join Date
    01-08-2014
    Location
    wigan
    MS-Off Ver
    2007
    Posts
    78

    Re: Show ribbon when switching workbooks

    hi - sorry I did ask yesterday- how do I put the code in tags?

    thanks

  6. #6
    Registered User
    Join Date
    01-08-2014
    Location
    wigan
    MS-Off Ver
    2007
    Posts
    78

    Re: Show ribbon when switching workbooks

    thank you - i have read the rule about tags. thank you for highlighting it.

  7. #7
    Registered User
    Join Date
    01-08-2014
    Location
    wigan
    MS-Off Ver
    2007
    Posts
    78

    Re: Show ribbon when switching workbooks

    hello - any ideas why this returns a "400" error message?

    Please Login or Register  to view this content.

+ 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. Switching between Workbooks
    By voro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2012, 10:33 AM
  2. Switching between workbooks
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2010, 09:07 AM
  3. Switching between workbooks
    By toocold in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2007, 08:22 AM
  4. switching between workbooks
    By dabith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2006, 07:45 PM
  5. [SOLVED] Switching between workbooks
    By Jim in forum Excel General
    Replies: 3
    Last Post: 05-06-2005, 12:06 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