Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an interesting project here. I have disabled all the command bars and
toolbars with VBA code--which is great for my purposes--but I would like to create a custom right click (not a toolbar which I know how to do) with certain commands. Is that possible? I would like to put a couple things like "clear contents" for a radio button and print sheet and "Home" which would hyperlink my user back to a certain worksheet. Can anyone help me with code to do this? Here is what I use now to disable everything: Private Sub Workbook_WindowActivate(ByVal Wn As Window) Application.DisplayFormulaBar = false ActiveWindow.DisplayHeadings = false Application.DisplayStatusBar = false Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",false)" 'This will disable all Command bars Dim Cbar As CommandBar For Each Cbar In Application.CommandBars Cbar.Enabled = false Next End Sub Private Sub Workbook_WindowDeactivate(ByVal Wn As Window) Application.DisplayFormulaBar = True ActiveWindow.DisplayHeadings = True Application.DisplayStatusBar = True Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",true)" 'This will disable all Command bars Dim Cbar As CommandBar For Each Cbar In Application.CommandBars Cbar.Enabled = True Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom Right Click--VBA? | Excel Programming | |||
Custom Right Click | Excel Programming | |||
Cannot click twice on custom menu in Excel | Excel Programming | |||
Double Click Custom Command Bar | Excel Programming | |||
custom right click menu | Excel Programming |