Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change 'Caption' on ToggleButtons with VBA
Thanks a bunch, Greg. The Object property of the OleObjects collection was
what I was missing. Your procedure worked perfectly and I'll be using this a lot in the near future. -- Thanks again, Jay "Greg Wilson" wrote: Try: Sub addToggles() Dim i As Integer For i = 0 To 1 With ActiveSheet.OLEObjects.Add("Forms.ToggleButton.1", _ Left:=1 + i * 73, Top:=243, Width:=72, Height:=30.75) .Object.Caption = IIf(i = 0, "Start Date", "End Date") End With Next End Sub Regards, Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change 'Caption' on ToggleButtons with VBA
You're welcome. Thanks for the feedback.
Greg "Jay" wrote: Thanks a bunch, Greg. The Object property of the OleObjects collection was what I was missing. Your procedure worked perfectly and I'll be using this a lot in the near future. -- Thanks again, Jay "Greg Wilson" wrote: Try: Sub addToggles() Dim i As Integer For i = 0 To 1 With ActiveSheet.OLEObjects.Add("Forms.ToggleButton.1", _ Left:=1 + i * 73, Top:=243, Width:=72, Height:=30.75) .Object.Caption = IIf(i = 0, "Start Date", "End Date") End With Next End Sub Regards, Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change caption of a button | Excel Worksheet Functions | |||
Change 'Caption' on ToggleButtons with VBA | Excel Programming | |||
Change Caption of Button | Excel Programming | |||
change the value of togglebuttons | Excel Programming | |||
Change CommandButton Caption | Excel Programming |