PC Review


Reply
Thread Tools Rate Thread

command button caption

 
 
=?Utf-8?B?TGVzSHVybGV5?=
Guest
Posts: n/a
 
      16th Nov 2007
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 With Quote
 
 
 
 
Limey
Guest
Posts: n/a
 
      16th Nov 2007
On Nov 16, 1:15 pm, LesHurley <LesHur...@discussions.microsoft.com>
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
 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      16th Nov 2007
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" <(E-Mail Removed)> wrote in message
news:5C613146-DF2F-4348-9C64-(E-Mail Removed)...
>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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
COMMAND BUTTON CAPTION Chai Microsoft Access Form Coding 2 13th Apr 2010 04:33 PM
RE: Command Button Caption - VBA JLGWhiz Microsoft Excel Programming 0 31st Jul 2008 07:00 PM
Command Button Caption =?Utf-8?B?UWFzcGVj?= Microsoft Excel Programming 1 27th Jan 2005 03:30 PM
Re: Command Button Caption Dave Peterson Microsoft Excel Misc 0 7th Aug 2004 12:36 AM
Re: Command Button Caption Dave Peterson Microsoft Excel Misc 0 6th Aug 2004 08:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 PM.