LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Return text in textButton from cell

Hi all,

I need to change the text in textButton by doing the following:
When I write for instance"2" in cell A2 I want the "2" value to be displayed
as text in the textButton

I got this code from "papou" just a while a go, but I need to modify it so
it works in a textbutton instead(the one you get from "Format" toolbar).
I have tried to record the event but I failed it.

A little twist: I have 30 buttons I want to be able to do this
on...............

Thanks in advance!

//Thomas


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$15" And Target.Value < "" Then
Me.CommandButton1.Caption = Target.Value
End If
End Sub




 
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
IF cell contains certain text return value Eán[_2_] Excel Worksheet Functions 11 April 19th 23 02:12 PM
Enter text in a cell to return a text value in same cell Danno 24/7[_2_] Excel Discussion (Misc queries) 6 May 9th 08 06:26 AM
lookup a text cell and return text Cristi R Excel Discussion (Misc queries) 4 August 2nd 06 02:41 PM
How do you make cell 2 return data if cell 1 contains text? jermsalerms Excel Discussion (Misc queries) 3 January 5th 06 10:44 PM
return textfrom cell into textbutton/commandbutton Jonsson Excel Programming 5 September 18th 04 09:44 AM


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