Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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" wrote in message
...
Hi Craig

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

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


"Craig" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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" 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" wrote in message ...
Hi Craig

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

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


"Craig" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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" wrote in message
...
Hi Graig

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




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


"Craig" 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" wrote in message
...
Hi Craig

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

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


"Craig" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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" wrote in message
...
Hi Graig

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




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


"Craig" 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" wrote in message
...
Hi Craig

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

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


"Craig" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hiding the CommandBars


Craig,

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

ANy help or experience you can share would be appreciated

--
Bruce00
-----------------------------------------------------------------------
Bruce001's Profile: http://www.excelforum.com/member.php...fo&userid=2663
View this thread: http://www.excelforum.com/showthread.php?threadid=48041

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble hiding commandbars Andy Excel Programming 2 October 19th 04 04:17 PM
Commandbars Libby Excel Programming 1 August 8th 04 07:11 PM
CommandBars garry Excel Programming 3 June 24th 04 03:12 PM
CommandBars defj Excel Programming 2 November 16th 03 12:57 AM


All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"