#1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Wild Ideas

Is it possible to change the caption on a command button
(in excel/vba) when a user clicks the button to say
something different.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Wild Ideas

wrote in message
...
Is it possible to change the caption on a command button
(in excel/vba) when a user clicks the button to say
something different.


Private Sub CommandButton1_Click()
Static lCount As Long
If lCount Mod 2 Then
CommandButton1.Caption = "Click Me Once"
Else
CommandButton1.Caption = "Click Me Again"
End If
lCount = lCount + 1
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



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
Anyone else have any ideas?? M&M[_2_] Excel Discussion (Misc queries) 3 August 11th 07 01:51 PM
Its a wild one, maybe. comotoman Excel Discussion (Misc queries) 1 September 16th 05 07:11 PM
Any Ideas? GAIL HORVATH Excel Worksheet Functions 2 May 30th 05 04:17 PM
Any Ideas Greg B Excel Discussion (Misc queries) 7 May 16th 05 03:41 AM
Any ideas? Steph[_3_] Excel Programming 0 May 25th 04 07:48 PM


All times are GMT +1. The time now is 12:49 PM.

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

About Us

"It's about Microsoft Excel"