Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Heloo
Can anyone plzz help me to get this code below working.....All I am looking for is to add another button to custom format toolbar and put my own format.....Any ideas help greatly appreciated... Sub MakeCustomFormatDisplay() Dim Tbar As CommandBar Dim NewBtn As CommandBarButton On Error Resume Next CommandBars("Custom Format").Delete On Error GoTo 0 Set Tbar = CommandBars.Add With Tbar ..Name = "Custom Format" ..Visible = True End With Set NewBtn = CommandBars("Custom Format").Controls.Add(Type:=msoControlButton) With NewBtn ..Caption = " " ..OnAction = "FormatChanger" ..TooltipText = "Click to change the Custom format" ..Style = msoButtonCaption End With Call UpdateToolbar End Sub Sub UpdateToolbar() On Error Resume Next CommandBars("Custom Format").Controls(1).Caption = ActiveCell.CustomFormat End Sub Sub FormatChanger() Dim r As Range For Each r In Selection Select Case r.Value Case 1 r.Value = "Read Only" Case 2 r.Value = "Assessor" Case 3 r.Value = "Reviewer" End Select Next Call UpdateToolbar End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
condionally formatting based on another cells formatting? | Excel Discussion (Misc queries) | |||
Formatting cells in a column with conditional formatting? | Excel Discussion (Misc queries) | |||
Formatting Question | Excel Discussion (Misc queries) | |||
Formatting Question | Excel Discussion (Misc queries) | |||
Formatting Question | Excel Worksheet Functions |