Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Simon
Try this.... -------------------- Dim c As Variant On Error Resume Next With Application.CommandBars("Worksheet Menu Bar") For Each c In .Controls If c.Caption = "EN" Then c.Delete Next c ..Controls.Add Type:=msoControlButton, ID:=2950, Befo=1 ..Controls(1).Caption = "EN" ..Controls(1).TooltipText = "Enable Events" ..Controls(1).OnAction = ThisWorkbook.Name & "!enevents" ..Controls(1).Style = msoButtonCaption End With End Sub -------------------- -- XL2002 Regards William "Simon Lloyd " wrote in message ... | Hi William, | | Well i tried your code and inserted it word for word only i keep | getting an error saying method of class is unsupported!, when i debug | it tells me that "c" is empty, any ideas what im doing wrong! | | Simon | | | --- | Message posted from http://www.ExcelForum.com/ | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
enabling/disabling a set of code from within a spreadsheet sheet | Excel Discussion (Misc queries) | |||
Enabling Events | Excel Discussion (Misc queries) | |||
Disabling code using a button? | Excel Programming | |||
Disabling/Enabling Macros | Excel Programming | |||
Enabling/Disabling Macros | Excel Programming |