Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default command button caption

I have a command button on a worksheet with a CLICK event handler. Is it
possible to toggle the caption on the button between say, Set , Reset with
each click?
--
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default command button caption

On Nov 16, 1:15 pm, LesHurley
wrote:
I have a command button on a worksheet with a CLICK event handler. Is it
possible to toggle the caption on the button between say, Set , Reset with
each click?
--
Thanks


Yes it is possible, I've just quickly made a userform to do this.
Could you provide more detail? Why you would want to do this, as it
looks a bit confusing to me, not least to your users. Is the button
running the same code with each click or different code?

Dave
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default command button caption

Public Sub Test()
With ActiveSheet.Buttons("Button 1")
If .Caption = "Set" Then
.Caption = "Reset"
Else
.Caption = "Set"
End If
End With
End Sub


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"LesHurley" wrote in message
...
I have a command button on a worksheet with a CLICK event handler. Is it
possible to toggle the caption on the button between say, Set , Reset with
each click?
--
Thanks



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
using vba to change command button caption PaulaO Excel Programming 2 April 5th 06 07:35 PM
multi line caption on command button?? neowok[_87_] Excel Programming 3 February 16th 06 09:50 AM
changing the caption of a command button JWCrosby Excel Programming 2 December 8th 05 08:09 PM
Command Button Caption Qaspec Excel Programming 1 January 27th 05 03:30 PM
Urgent: VBA Command Button Caption Problem Disco[_4_] Excel Programming 1 November 12th 03 10:38 AM


All times are GMT +1. The time now is 06:08 PM.

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"