Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toolbar to launch Macros
I have created a customized Toolbar to launch Macros , a procedure by
Dave Peterson. Adds a nice professional touch. http://www.contextures.com/xlToolbar02.html#Setup I need to limit the macro only to a few sheets. Can I add code to "Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)" that will enable or disable my toolbar macro? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toolbar to launch Macros
Try the workbook module instead
Private Sub Workbook_SheetActivate(ByVal Sh As Object) If ActiveSheet.Name = "Sheet1" Or ActiveSheet.Name = "Sheet2" Then MsgBox "Your toolBar Macro Here" 'change to Call CreateMenubar End If End Sub Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) MsgBox "Your remove toolbar Macro Here" ' change to Call RemoveMenubar End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toolbar to launch Macros
I'll just use something like this in the sheet code mdules:
Private Sub Worksheet_Deactivate() RemoveToolbar ' this is contains code that removes the toolbar End Sub and Private Sub Worksheet_Deactivate() CreateToolbar ' this module contains code to create the toolbar End Sub -- Gary K "Fan924" wrote in message ... I have created a customized Toolbar to launch Macros , a procedure by Dave Peterson. Adds a nice professional touch. http://www.contextures.com/xlToolbar02.html#Setup I need to limit the macro only to a few sheets. Can I add code to "Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)" that will enable or disable my toolbar macro? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toolbar to launch Macros
Thanks guys. I guess i didn't study it long enough. The downloaded
from the link above contained the following. Sub RemoveMenubar() Sub CreateMenubar() Now it turns on and off when I select a sheet. Looking good. The toolbar pops up in the middle of the page and not with the other menus at the top. Any way to fix that? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toolbar to launch Macros
Got it
..Position = msoBarFloat change to ..Position = msoBarTop |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can you launch Macros from a customized Toolbar? | Excel Programming | |||
toolbar macros | Excel Discussion (Misc queries) | |||
Macro launch - Button vs Manual launch , has different results. | Excel Programming | |||
Toolbar macros | Excel Programming | |||
Macros - call or launch from fromula | Excel Programming |