Custom Toolbar Manipluation

Guanjin Peter

Active Member
Joined
May 21, 2008
Messages
429
I created a custom toolbar named "sheetScroll"

can I manipulate in a way that it'll only open for this workbook (sample.xls) and not other workbooks?
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You can change .Visible property of your toolbar in Workbook_Activate and Workbook_Deactivate events and toolbar will be shown only for your workbook.
 
Upvote 0
Yes you should be able to put in an Open & Close event on the workbook in question to load / unload the toolbar... where name = sheetScroll (may not need add-in code depends on how you have compiled things I guess)

Code:
Private Sub Workbook_Open()
AddIns("name").Installed = True
Application.CommandBars("name").Visible = True
End Sub

and close

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
AddIns("name").Installed = False
Application.CommandBars("name").Visible = False
End Sub
 
Upvote 0
you would need to attach the toolbar to the file before distributing (via View -> Toolbars -> Customise)
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top