Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Changing text on a button

Can you have two different texts on a button?

If the user clicks the button - I would like it to say - "Showing Summary"

If the user makes a change to the spreadsheet - I would like it to say -
"Click for Summary pages"
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 77
Default Changing text on a button

Hi Brad,

Yes. You would have to do it via vba though.

A few things,
1. Relabel the commandbutton to cmdshowsum, or keep the one you have but
don't forget to change all the references in the code.
2. I used worksheet1 for this example, if you are using a different one be
sure to change 1 to whatever
3. Right click the sheet tab, view code, and paste the following.

Private Sub cmdshowsum_Click()

cmdshowsum.Caption = "Showing Summary"

End Sub

Private Sub Worksheet_Change(ByVal Target As Range)

Dim csp As String
csp = "Click for Summary Pages"

With Worksheets(1)
cmdshowsum.Caption = csp
End With

End Sub


hth

BigPig
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default Changing text on a button

Hi,

This can be done using VBA programming environment built in Microsoft Excel.
You can do this by knowing if there is a change event which has occured.
Preferably changing a image would be convinient than changing text button.

Challa Prabhu

"Brad" wrote:

Can you have two different texts on a button?

If the user clicks the button - I would like it to say - "Showing Summary"

If the user makes a change to the spreadsheet - I would like it to say -
"Click for Summary pages"

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
Changing the Spin Button Interval [email protected] Excel Discussion (Misc queries) 2 June 12th 07 05:35 PM
Form Button - Changing Text dan Excel Discussion (Misc queries) 2 February 8th 07 12:58 PM
Changing Button Color Barb Reinhardt Excel Discussion (Misc queries) 0 January 19th 07 08:26 PM
Changing Button Color stumac Excel Discussion (Misc queries) 0 January 19th 07 08:17 PM
Changing Button Color Mike Excel Discussion (Misc queries) 0 January 19th 07 08:14 PM


All times are GMT +1. The time now is 09:13 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"