ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Showing custom toolbars on one W/S only (https://www.excelbanter.com/excel-discussion-misc-queries/58182-showing-custom-toolbars-one-w-s-only.html)

JRD

Showing custom toolbars on one W/S only
 

I have created several custom toolbars in a workbook that I call in the
Workbook_Open event and close in Workbook_BeforeClose.

The toolbars really only apply to one worksheet and I would like for
them to only be visible one that sheet. Does anyone have a suggestion
on how I can make them invisible on the other worksheets?

Please keep it simple. Even though I've cobbled together this workbook
over the past couple of years, I am far from an expert. Many Thanks...


Jim


--
JRD
------------------------------------------------------------------------
JRD's Profile: http://www.excelforum.com/member.php...fo&userid=5203
View this thread: http://www.excelforum.com/showthread...hreadid=489803


Dave Peterson

Showing custom toolbars on one W/S only
 
Hide (or delete) them with the worksheet_deactivate and restore them with the
worksheet_activate events.

(And same with workbook_activate/_deactivate so they're hidden when you swap
workbooks.)

I went to google groups and searched for workbook_deactivate. I sorted the
results by date and found this thread:

http://groups.google.co.uk/group/mic...f7dde5a0477be9

or

http://snipurl.com/iiye

I'm sure you can find samples of worksheet_activate/_deactivate.

JRD wrote:

I have created several custom toolbars in a workbook that I call in the
Workbook_Open event and close in Workbook_BeforeClose.

The toolbars really only apply to one worksheet and I would like for
them to only be visible one that sheet. Does anyone have a suggestion
on how I can make them invisible on the other worksheets?

Please keep it simple. Even though I've cobbled together this workbook
over the past couple of years, I am far from an expert. Many Thanks...

Jim

--
JRD
------------------------------------------------------------------------
JRD's Profile: http://www.excelforum.com/member.php...fo&userid=5203
View this thread: http://www.excelforum.com/showthread...hreadid=489803


--

Dave Peterson

JRD

Showing custom toolbars on one W/S only
 

This has almost got it. I added the code that activates/deactivates
the toolbars and put the worksheet_activate on the one I want (Estimate
Sheet) and put the worksheet_deactivate on all the other sheets. This
seems to work fine, except for one little thing.

After activating the toolbars by clicking on the Estimate Worksheet, I
then have to select TWO sheets for the toolbars to disappear. For
instance, if I click on Worksheet1, then the toolbars are still
visible. If I click on Worksheet2, then they disappear and don't
reappear until I select the Estimate Worksheet again. Does this make
sense?


Jim


--
JRD
------------------------------------------------------------------------
JRD's Profile: http://www.excelforum.com/member.php...fo&userid=5203
View this thread: http://www.excelforum.com/showthread...hreadid=489803


Dave Peterson

Showing custom toolbars on one W/S only
 
Ooh. I think I would have used the worksheet_deactive event in that one
worksheet and used it to hide the toolbar.

I don't think you needed to touch those other sheet events at all.



JRD wrote:

This has almost got it. I added the code that activates/deactivates
the toolbars and put the worksheet_activate on the one I want (Estimate
Sheet) and put the worksheet_deactivate on all the other sheets. This
seems to work fine, except for one little thing.

After activating the toolbars by clicking on the Estimate Worksheet, I
then have to select TWO sheets for the toolbars to disappear. For
instance, if I click on Worksheet1, then the toolbars are still
visible. If I click on Worksheet2, then they disappear and don't
reappear until I select the Estimate Worksheet again. Does this make
sense?

Jim

--
JRD
------------------------------------------------------------------------
JRD's Profile: http://www.excelforum.com/member.php...fo&userid=5203
View this thread: http://www.excelforum.com/showthread...hreadid=489803


--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com