Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hiding/Restoring Built-In CommandBars?

Hi there,

I've been reading up on CommandBars, and haven't yet seen anything to
suggest how to *hide* a built-in CommandBar........and to restore it
later. Was wondering if some kind soul could offer some advice.....?

I'm creating an application in Excel. The application is to have its
own Menu Bar, with Menus and Commands specific to the application.
The idea is for this custom Bar to replace the built-in Bar.

But, before the application makes these changes to the user's
environment, I'd like it to "audit" the current state of the built-in
Bar, and restore it to that state when the application exits.

Thank you kindly.

Jason Paris

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Hiding/Restoring Built-In CommandBars?

hi
this will hide/unhide the custom command bar. it is boolen. you can assign
it to a custom icon but DON'T put the custom icon on the command bar that you
are trying to hide/unhide.
Sub CTB()
If Application.CommandBars("Custom 1").Visible = True Then
Application.CommandBars("Custom 1").Visible = False
Else
Application.CommandBars("Custom 1").Visible = True
End If
End Sub

custom menus:
I would keep the standard menu and just add to it. this keeps some kind of
familiarity to the application setup and avoids confusing the users too much.
understand:
1. custom command bars and menus apply ONLY to the pc being custiomized NOT
the file. you will have to customize each pc that will be using the custom
bars and menus so it might be wise to record/write a macro to do the
customizations.
2. you can put the customization macro in the file to run at file open and
hide at file close. see item 3 and 4 below. better yet...understand items 3
and 4 below.
3. be careful and not screw up any customizations the users may already have
on their pc. this tends to tick users off when they have to re-setup their pc
after you are done jerking their pc around.
4. be sure the users know that their pc will be customized BEFORE you start
adding/deleting/restoring their setup. have meetings and explain ie no
supprises.

regards
FSt1


"Jason Paris" wrote:

Hi there,

I've been reading up on CommandBars, and haven't yet seen anything to
suggest how to *hide* a built-in CommandBar........and to restore it
later. Was wondering if some kind soul could offer some advice.....?

I'm creating an application in Excel. The application is to have its
own Menu Bar, with Menus and Commands specific to the application.
The idea is for this custom Bar to replace the built-in Bar.

But, before the application makes these changes to the user's
environment, I'd like it to "audit" the current state of the built-in
Bar, and restore it to that state when the application exits.

Thank you kindly.

Jason Paris


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hiding/Restoring Built-In CommandBars?

Hi FSt1,

Thanks for the advice.

Your code seems to hide a *custom* Menu Bar. Is there a way to hide/
restore the built-in Menu Bar, and replace it with a custom one?

Or is it more a case of removing the *Menus* from the built-in Bar,
and replacing them custom Menus?

If that *is* the case, how does one keep track of the Menus that were
on the Bar before the removal, so that they can be restored as the
application exits? I suspect there's a generic "Restore Built-in Bar"
method somewhere?

Many thanks. :)

Jason Paris

On Jun 15, 11:20 am, FSt1 wrote:
hi
this will hide/unhide the custom command bar. it is boolen. you can assign
it to a custom icon but DON'T put the custom icon on the command bar that you
are trying to hide/unhide.
Sub CTB()
If Application.CommandBars("Custom 1").Visible = True Then
Application.CommandBars("Custom 1").Visible = False
Else
Application.CommandBars("Custom 1").Visible = True
End If
End Sub

custom menus:
I would keep the standard menu and just add to it. this keeps some kind of
familiarity to the application setup and avoids confusing the users too much.
understand:
1. custom command bars and menus apply ONLY to the pc being custiomized NOT
the file. you will have to customize each pc that will be using the custom
bars and menus so it might be wise to record/write a macro to do the
customizations.
2. you can put the customization macro in the file to run at file open and
hide at file close. see item 3 and 4 below. better yet...understand items 3
and 4 below.
3. be careful and not screw up any customizations the users may already have
on their pc. this tends to tick users off when they have to re-setup their pc
after you are done jerking their pc around.
4. be sure the users know that their pc will be customized BEFORE you start
adding/deleting/restoring their setup. have meetings and explain ie no
supprises.

regards
FSt1

"Jason Paris" wrote:
Hi there,


I've been reading up on CommandBars, and haven't yet seen anything to
suggest how to *hide* a built-in CommandBar........and to restore it
later. Was wondering if some kind soul could offer some advice.....?


I'm creating an application in Excel. The application is to have its
own Menu Bar, with Menus and Commands specific to the application.
The idea is for this custom Bar to replace the built-in Bar.


But, before the application makes these changes to the user's
environment, I'd like it to "audit" the current state of the built-in
Bar, and restore it to that state when the application exits.


Thank you kindly.


Jason Paris



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hiding/Restoring Built-In CommandBars?

Hi Jason

See this page that use Enabled
http://www.rondebruin.nl/menuid.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Jason Paris" wrote in message oups.com...
Hi FSt1,

Thanks for the advice.

Your code seems to hide a *custom* Menu Bar. Is there a way to hide/
restore the built-in Menu Bar, and replace it with a custom one?

Or is it more a case of removing the *Menus* from the built-in Bar,
and replacing them custom Menus?

If that *is* the case, how does one keep track of the Menus that were
on the Bar before the removal, so that they can be restored as the
application exits? I suspect there's a generic "Restore Built-in Bar"
method somewhere?

Many thanks. :)

Jason Paris

On Jun 15, 11:20 am, FSt1 wrote:
hi
this will hide/unhide the custom command bar. it is boolen. you can assign
it to a custom icon but DON'T put the custom icon on the command bar that you
are trying to hide/unhide.
Sub CTB()
If Application.CommandBars("Custom 1").Visible = True Then
Application.CommandBars("Custom 1").Visible = False
Else
Application.CommandBars("Custom 1").Visible = True
End If
End Sub

custom menus:
I would keep the standard menu and just add to it. this keeps some kind of
familiarity to the application setup and avoids confusing the users too much.
understand:
1. custom command bars and menus apply ONLY to the pc being custiomized NOT
the file. you will have to customize each pc that will be using the custom
bars and menus so it might be wise to record/write a macro to do the
customizations.
2. you can put the customization macro in the file to run at file open and
hide at file close. see item 3 and 4 below. better yet...understand items 3
and 4 below.
3. be careful and not screw up any customizations the users may already have
on their pc. this tends to tick users off when they have to re-setup their pc
after you are done jerking their pc around.
4. be sure the users know that their pc will be customized BEFORE you start
adding/deleting/restoring their setup. have meetings and explain ie no
supprises.

regards
FSt1

"Jason Paris" wrote:
Hi there,


I've been reading up on CommandBars, and haven't yet seen anything to
suggest how to *hide* a built-in CommandBar........and to restore it
later. Was wondering if some kind soul could offer some advice.....?


I'm creating an application in Excel. The application is to have its
own Menu Bar, with Menus and Commands specific to the application.
The idea is for this custom Bar to replace the built-in Bar.


But, before the application makes these changes to the user's
environment, I'd like it to "audit" the current state of the built-in
Bar, and restore it to that state when the application exits.


Thank you kindly.


Jason Paris



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
Hiding and restoring controls Paul S Excel Programming 0 August 14th 06 01:04 PM
Restoring ToolBars/Commandbars CiaraG[_5_] Excel Programming 6 February 11th 06 04:27 AM
Hiding the CommandBars Craig[_21_] Excel Programming 6 January 12th 06 02:20 PM
Built in Commandbars Dave Martin Excel Programming 2 August 31st 03 03:47 AM
Built In CommandBars Sander Lablans Excel Programming 0 August 1st 03 11:59 AM


All times are GMT +1. The time now is 12:12 AM.

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

About Us

"It's about Microsoft Excel"