+ Reply to Thread
Results 1 to 3 of 3

Ribbon Hide

Hybrid View

moktr Ribbon Hide 05-17-2020, 02:29 AM
AliGW Re: Ribbon Hide 05-17-2020, 02:31 AM
LJMetzger Re: Ribbon Hide 05-25-2020, 10:04 AM
  1. #1
    Registered User
    Join Date
    01-08-2020
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    2010
    Posts
    9

    Ribbon Hide

    Hi,

    I created a custom workbook with hide ribbon by using vba name is "Magic file".But when i open another workbook with after opening "Magic file" at a time, next work book also hiding ribbon.So how can i solved this problem? Plz help me..Hide ribbon code-

     "Private Sub Workbook_Open()
                                                 Application.Visible = False
                                                 UserForm1.Show
                                                 Application.ExecuteExcel4Macro "show.toolbar(""ribbon"",false)"
                                                 End Sub"
    Attached Files Attached Files
    Last edited by moktr; 05-17-2020 at 05:54 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,691

    Re: Ribbon Hide

    Administrative Note:

    You have been advised before about this!

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Ribbon Hide

    Hi,

    Addition of the following Macros in the ThisWorkbook Code Module may help you:
    Private Sub Workbook_Activate()
      Application.ExecuteExcel4Macro "show.toolbar(""ribbon"",false)"
    End Sub
    
    Private Sub Workbook_Deactivate()
      Application.ExecuteExcel4Macro "show.toolbar(""ribbon"",true)"
    End Sub
    
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
      Application.ExecuteExcel4Macro "show.toolbar(""ribbon"",true)"
    End Sub
    Lewis

+ 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. Hide Ribbon
    By Toby1982 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-08-2019, 01:37 PM
  2. [SOLVED] Hide Ribbon
    By EssoExplJoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2017, 10:32 AM
  3. VBA Code to hide Ribbon Bar
    By pmgibbs79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2016, 12:13 AM
  4. [SOLVED] Hide Ribbon
    By pedjvak in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-31-2013, 03:01 AM
  5. Code to hide Ribbon
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-06-2012, 04:06 AM
  6. Hide Tab on Custom Ribbon
    By WilliamJones in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-05-2011, 08:53 AM
  7. Ribbon - Hide the Get Started tab
    By paulzak in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-19-2009, 09:03 AM

Tags for this Thread

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