Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Change 'Caption' on ToggleButtons with VBA

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change 'Caption' on ToggleButtons with VBA JLGWhiz Excel Programming 2 March 28th 07 02:03 AM
Change 'Caption' on ToggleButtons with VBA Jay Excel Programming 1 March 28th 07 01:08 AM
Change Caption of Button Alexander Excel Programming 3 August 17th 05 04:45 PM
How to change Button Caption? BrianB Excel Programming 3 June 1st 05 06:24 PM
change the value of togglebuttons Nelson Excel Programming 1 November 10th 04 04:17 AM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"