+ Reply to Thread
Results 1 to 3 of 3

Minimizing Ribbon

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Minimizing Ribbon

    Greetings,
    I am running the following macro on Workbook Open. All is good in that it minimizes the ribbon. However, if an other Workbook is opened before this Workbook is opened and the Ribbon is minimized in that Workbook, the code will maximize the ribbon - creating an opposite effect.
    Private Sub Workbook_Open()
    Application.ScreenUpdating = False
    Dim wSheetName As Worksheet
    For Each wSheetName In Worksheets
    If wSheetName.Visible = xlSheetVisible Then
            wSheetName.protect Password:="frank", UserInterFaceOnly:=True
          End If
    Next wSheetName
    Application.CommandBars.ExecuteMso "MinimizeRibbon"
    
    ActiveWindow.DisplayHorizontalScrollBar = False
    ActiveWindow.DisplayVerticalScrollBar = False
    ActiveWindow.DisplayHeadings = False
    Application.DisplayFormulaBar = False
    
    Worksheets("MainOpen").Activate
    Worksheets("MainOpen").Select
    
    ActiveSheet.ScrollArea = "A1:V1"
        Range("V1").Select
    
    ActiveWindow.Zoom = 100
    
    Application.Run ("Unprotect_SOW")
    
    Application.ScreenUpdating = True
    
    End Sub

  2. #2
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Minimizing Ribbon

    You could look at this information page of Ron De Bruin - MVP

    http://www.rondebruin.nl/win/s2/win003.htm

    It'll show you how to handle the ribbon.
    Even a little help can be a big help !!
    1. A sample workbook says more then words. Add problem description and solution so we can understand the problem.
    2. Your appreciation is accepted by clicking the star "Add Reputation" at the lower left of the post.
    3. If your problem is solved, mark it as [SOLVED]: See "FAQ : " https://www.excelforum.com/faq.php
    4. Use [CODE] [/CODE] tags to illustrate your code: see here

  3. #3
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Minimizing Ribbon

    MarMo,
    I'll review the link. Thank you for sharing.

+ 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. Put VBA ribbon together with Custom UI Editor Ribbon
    By czarlando in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2016, 05:46 AM
  2. [SOLVED] Ribbon Change based on Non-Ribbon Object
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-07-2014, 01:18 PM
  3. [SOLVED] An alternative to the Add-Ins ribbon tab - Global Custom Ribbon Tab by Ken Puls
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2014, 10:01 PM
  4. Minimizing a Userform
    By JP777 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2012, 09:10 AM
  5. Ribbon - Multiple xlam adding into single Ribbon tab
    By gooopil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2011, 03:40 PM
  6. Minimizing Scrap...
    By ozdemir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2009, 11:54 PM
  7. minimizing problem
    By Dave in forum Excel General
    Replies: 5
    Last Post: 06-07-2005, 02:05 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