Results 1 to 5 of 5

Excel 2007: Ribbon set to hide, but doesn't before User Form opens.

Threaded View

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    Washington, OK
    MS-Off Ver
    Office 2010
    Posts
    23

    Excel 2007: Ribbon set to hide, but doesn't before User Form opens.

    My first post by the way, so here goes.
    I have excel set to open into full screen and hide everything except the title bar.
    I worked perfectly until I added the load userform command into the string.
    I have also tried moving the command into another private sub and running a call macro to load it from another module.
    No matter what I do the userform loads before the ribbon hides.

    Another tips on cleaning up my code are welcome

    My code looks like this:

    
    Private Sub Workbook_Activate()
        On Error Resume Next
        With Application
            .DisplayAlerts = False
            .DisplayFullScreen = True
            .CommandBars("Worksheet Menu Bar").Enabled = False
            .CommandBars.ActiveMenuBar.Enabled = False
            .CommandBars("Full Screen").Enabled = False
            .DisplayScrollBars = False
            .DisplayFormulaBar = False
        End With
         
        With ActiveWindow
            .DisplayHorizontalScrollBar = False
            .DisplayVerticalScrollBar = False
            .DisplayWorkbookTabs = False
            .DisplayGridlines = False
            .DisplayHeadings = False
            .DisplayPageBreaks = True
        End With
        
        Load UserFormOpen: UserFormOpen.Show
        
        Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
        
    End Sub
    Last edited by Casedias; 09-16-2011 at 05:07 PM. Reason: closing code tag is [/code]
    Casey Wells

    Most Appreciative Rookie!

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