Hi All,
I have a custom Commandbar addin with lots of my own macros built in.
I'm trying to pass a value to a routine and then action it but i can't sus it out.
here's the commandbar code (this works fine, but i would love to know how to pass the caption of the selected button instead of having to type "vbUpperCase")
Set ctlSub2 = Ctl.Controls.Add(msoControlButton, , , , True)
With ctlSub2
.Caption = "vbUpperCase"
.OnAction = "CaseTool " & """" & "vbUpperCase" & """"
.Style = msoButtonCaption
End With
So basically when i click on the "vbUppercase" button it runs the following (but doesn't work
)
Public Sub CaseTool(StrConv As String)
Dim Cell As Range
For Each Cell In Selection
Cell.Value = StrConv(Cell.Value, StrConv)
Next Cell
End Sub
any help is really appreciated 
thanks for taking the time to read it
Bookmarks