Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
This is what I "feared". I would personnaly rather recommend you use one of the controls tool box items instead. As it will be definitely easier for you to access its properties (Value or Caption for instance). In the sample code I provided previously you will note that I am using the key word "Me" which identifies the worksheet since you are dealing with this object class when you are in the Worksheet code (right-clicking on the worksheet tab and selecting view code brings you there) Using this method will automatically provide access to any property or object related to the worksheet using the dot (.) Thus if you have previoulsy created a commandbutton for example (from the controls tool box) and by default its name will be CommandButton1, if you use the word Me followed by the dot (ie: Me.) then you will have a pop up list with all the available items among which you will find the object "CommandButton1". Hope this helps you get on further. Cordially Pascal "Jonsson" a écrit dans le message de ... Forms Toolbar //Thomas "papou" skrev i meddelandet ... Where did you get the "textbutton" from: Forms tool bar Controls Tool Box ? Cordially Pascal "Jonsson" a écrit dans le message de ... Hi Pascal Thanks for your answer. I'm sure the code is okay, but is it something I have to do to get the code working in my application. It seems to be some problem, because the macro wont work for me. My button is'nt a commandButton, it's a textbutton (hope you know what I mean). Could that be the problem? "papou" skrev i meddelandet ... Hello Place this in the sheet's code and amend accordingly: 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 HTH Cordially Pascal "Jonsson" a écrit dans le message de ... Hi all, Is it possible to return a textvalue from a cell into a textbutton/commandbutton so that the text in the button changes depending of what you write in the cell? If so, how to do it? Any help is apprecciated!! //Thomas |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null | Excel Discussion (Misc queries) | |||
CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
Commandbutton | Excel Programming |