+ Reply to Thread
Results 1 to 7 of 7

Hiding the CommandBars

Hybrid View

  1. #1
    Craig
    Guest

    Hiding the CommandBars

    Hi there,
    I'm trying to hide the look of excel in my program without creating
    userforms for everything.
    I'm usung this code at startup:

    Application.CommandBars.ActiveMenuBar.Enabled = False
    Application.DisplayFullScreen = True
    Application.CommandBars("Full Screen").Enabled = False

    This works but as I change sheets via command buttons... I get a blank gray
    bar at the top of the screen.
    It also does this when I bring up a Userform I created.

    The only way I can get rid of this blank gray bar is by right clicking and
    selecting one of the toolbars then right clicking again to remove it.

    Is there a way I don't have to see this blank gray bar??

    Thanks Craig



  2. #2
    Ron de Bruin
    Guest

    Re: Hiding the CommandBars

    Hi Craig

    Look here for example code
    http://www.rondebruin.com/menuid.htm

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Craig" <right@shaw.ca> wrote in message news:_r%8f.354301$1i.69552@pd7tw2no...
    > Hi there,
    > I'm trying to hide the look of excel in my program without creating userforms for everything.
    > I'm usung this code at startup:
    >
    > Application.CommandBars.ActiveMenuBar.Enabled = False
    > Application.DisplayFullScreen = True
    > Application.CommandBars("Full Screen").Enabled = False
    >
    > This works but as I change sheets via command buttons... I get a blank gray bar at the top of the screen.
    > It also does this when I bring up a Userform I created.
    >
    > The only way I can get rid of this blank gray bar is by right clicking and selecting one of the toolbars then right clicking again
    > to remove it.
    >
    > Is there a way I don't have to see this blank gray bar??
    >
    > Thanks Craig
    >




  3. #3
    Craig
    Guest

    Re: Hiding the CommandBars

    I placed your code in ThisWorkBook.Activate and Deactivate
    Works great from switching between worksheets.... but when I activate a
    userform the gray blank bar comes back.
    When I close the userform the blank gray bar is still there.

    Craig



    "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
    news:OcTBWwS3FHA.1276@TK2MSFTNGP09.phx.gbl...
    > Hi Craig
    >
    > Look here for example code
    > http://www.rondebruin.com/menuid.htm
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "Craig" <right@shaw.ca> wrote in message
    > news:_r%8f.354301$1i.69552@pd7tw2no...
    >> Hi there,
    >> I'm trying to hide the look of excel in my program without creating
    >> userforms for everything.
    >> I'm usung this code at startup:
    >>
    >> Application.CommandBars.ActiveMenuBar.Enabled = False
    >> Application.DisplayFullScreen = True
    >> Application.CommandBars("Full Screen").Enabled = False
    >>
    >> This works but as I change sheets via command buttons... I get a blank
    >> gray bar at the top of the screen.
    >> It also does this when I bring up a Userform I created.
    >>
    >> The only way I can get rid of this blank gray bar is by right clicking
    >> and selecting one of the toolbars then right clicking again to remove it.
    >>
    >> Is there a way I don't have to see this blank gray bar??
    >>
    >> Thanks Craig
    >>

    >
    >




  4. #4
    Ron de Bruin
    Guest

    Re: Hiding the CommandBars

    Hi Graig

    Can't reproduce this
    Is the userform in the same file ?




    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Craig" <right@shaw.ca> wrote in message news:5b19f.351926$oW2.340358@pd7tw1no...
    >I placed your code in ThisWorkBook.Activate and Deactivate
    > Works great from switching between worksheets.... but when I activate a userform the gray blank bar comes back.
    > When I close the userform the blank gray bar is still there.
    >
    > Craig
    >
    >
    >
    > "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message news:OcTBWwS3FHA.1276@TK2MSFTNGP09.phx.gbl...
    >> Hi Craig
    >>
    >> Look here for example code
    >> http://www.rondebruin.com/menuid.htm
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "Craig" <right@shaw.ca> wrote in message news:_r%8f.354301$1i.69552@pd7tw2no...
    >>> Hi there,
    >>> I'm trying to hide the look of excel in my program without creating userforms for everything.
    >>> I'm usung this code at startup:
    >>>
    >>> Application.CommandBars.ActiveMenuBar.Enabled = False
    >>> Application.DisplayFullScreen = True
    >>> Application.CommandBars("Full Screen").Enabled = False
    >>>
    >>> This works but as I change sheets via command buttons... I get a blank gray bar at the top of the screen.
    >>> It also does this when I bring up a Userform I created.
    >>>
    >>> The only way I can get rid of this blank gray bar is by right clicking and selecting one of the toolbars then right clicking
    >>> again to remove it.
    >>>
    >>> Is there a way I don't have to see this blank gray bar??
    >>>
    >>> Thanks Craig
    >>>

    >>
    >>

    >
    >




  5. #5
    Craig
    Guest

    Re: Hiding the CommandBars

    Yes... the userform is the same file, I'll try creating another userform to
    see if it does it too.
    Craig

    "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
    news:u0d59LU3FHA.3636@TK2MSFTNGP09.phx.gbl...
    > Hi Graig
    >
    > Can't reproduce this
    > Is the userform in the same file ?
    >
    >
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "Craig" <right@shaw.ca> wrote in message
    > news:5b19f.351926$oW2.340358@pd7tw1no...
    >>I placed your code in ThisWorkBook.Activate and Deactivate
    >> Works great from switching between worksheets.... but when I activate a
    >> userform the gray blank bar comes back.
    >> When I close the userform the blank gray bar is still there.
    >>
    >> Craig
    >>
    >>
    >>
    >> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
    >> news:OcTBWwS3FHA.1276@TK2MSFTNGP09.phx.gbl...
    >>> Hi Craig
    >>>
    >>> Look here for example code
    >>> http://www.rondebruin.com/menuid.htm
    >>>
    >>> --
    >>> Regards Ron de Bruin
    >>> http://www.rondebruin.nl
    >>>
    >>>
    >>> "Craig" <right@shaw.ca> wrote in message
    >>> news:_r%8f.354301$1i.69552@pd7tw2no...
    >>>> Hi there,
    >>>> I'm trying to hide the look of excel in my program without creating
    >>>> userforms for everything.
    >>>> I'm usung this code at startup:
    >>>>
    >>>> Application.CommandBars.ActiveMenuBar.Enabled = False
    >>>> Application.DisplayFullScreen = True
    >>>> Application.CommandBars("Full Screen").Enabled = False
    >>>>
    >>>> This works but as I change sheets via command buttons... I get a blank
    >>>> gray bar at the top of the screen.
    >>>> It also does this when I bring up a Userform I created.
    >>>>
    >>>> The only way I can get rid of this blank gray bar is by right clicking
    >>>> and selecting one of the toolbars then right clicking again to remove
    >>>> it.
    >>>>
    >>>> Is there a way I don't have to see this blank gray bar??
    >>>>
    >>>> Thanks Craig
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




  6. #6
    Craig
    Guest

    Re: Hiding the CommandBars

    Ron... I've traced to what part of my code is causing this error. It happens
    when the code Activates another sheet.
    This sheet change is for a combobox, heres the code:
    The "Console" Worksheet is the Active sheet at start of code execution.

    Private Sub CommandButton8_Click()
    Dim varLastRow
    Application.ScreenUpdating = False

    'More code here to set vaules on the userform

    frmAudit.cboStore_Select.clear

    Store_Info.Activate ' This is where the error is made.

    Store_Info.Range("B2").End(xlDown).Select
    varLastRow = Activecell.Row
    frmAudit.cboStore_Select.AddItem ("<Select Store>")
    Store_Info.Range("B2").Select
    For x = 3 To varLastRow + 1
    frmAudit.cboStore_Select.AddItem (ActiveCell.Value)
    Activecell.Offset(1, 0).Select
    Next x
    frmAudit.cboStore_Select.ListIndex = 0
    Console.Activate
    Application.ScreenUpdating = True
    frmAudit.Show
    End Sub

    Here is the code in my ThisWorkBook:

    Private Sub Workbook_Activate()
    Application.DisplayFormulaBar = False
    Application.DisplayStatusBar = False
    Application.ShowStartupDialog = False
    Application.ShowWindowsInTaskbar = False
    Application.CommandBars("Cell").Enabled = False
    ActiveWindow.DisplayHorizontalScrollBar = False
    ActiveWindow.DisplayVerticalScrollBar = False
    ActiveWindow.DisplayWorkbookTabs = False
    Application.CommandBars("Worksheet Menu Bar").Enabled = False
    Application.CommandBars("Full Screen").Enabled = True
    End Sub

    The Workbook_Deactivate() is the same with opposite values

    This is hand type... so their may be some typo's

    Craig


    "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
    news:u0d59LU3FHA.3636@TK2MSFTNGP09.phx.gbl...
    > Hi Graig
    >
    > Can't reproduce this
    > Is the userform in the same file ?
    >
    >
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "Craig" <right@shaw.ca> wrote in message
    > news:5b19f.351926$oW2.340358@pd7tw1no...
    >>I placed your code in ThisWorkBook.Activate and Deactivate
    >> Works great from switching between worksheets.... but when I activate a
    >> userform the gray blank bar comes back.
    >> When I close the userform the blank gray bar is still there.
    >>
    >> Craig
    >>
    >>
    >>
    >> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
    >> news:OcTBWwS3FHA.1276@TK2MSFTNGP09.phx.gbl...
    >>> Hi Craig
    >>>
    >>> Look here for example code
    >>> http://www.rondebruin.com/menuid.htm
    >>>
    >>> --
    >>> Regards Ron de Bruin
    >>> http://www.rondebruin.nl
    >>>
    >>>
    >>> "Craig" <right@shaw.ca> wrote in message
    >>> news:_r%8f.354301$1i.69552@pd7tw2no...
    >>>> Hi there,
    >>>> I'm trying to hide the look of excel in my program without creating
    >>>> userforms for everything.
    >>>> I'm usung this code at startup:
    >>>>
    >>>> Application.CommandBars.ActiveMenuBar.Enabled = False
    >>>> Application.DisplayFullScreen = True
    >>>> Application.CommandBars("Full Screen").Enabled = False
    >>>>
    >>>> This works but as I change sheets via command buttons... I get a blank
    >>>> gray bar at the top of the screen.
    >>>> It also does this when I bring up a Userform I created.
    >>>>
    >>>> The only way I can get rid of this blank gray bar is by right clicking
    >>>> and selecting one of the toolbars then right clicking again to remove
    >>>> it.
    >>>>
    >>>> Is there a way I don't have to see this blank gray bar??
    >>>>
    >>>> Thanks Craig
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




  7. #7
    Registered User
    Join Date
    08-25-2005
    Posts
    17
    Craig,

    I was wondering if you found a way to get rid of the gray bar at the top of your screen. I am also getting this same error when I open another work book, make a sheet active in that workbook, and then move a bunch of data to my workbook. When the other workbook closes, the line is there.

    ANy help or experience you can share would be appreciated.

+ 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