Value from Cell Onto Command Button

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
207
Is it Possibel to get Value from Cell onto Commanbutton
So the Text on Commandbutton change if the text Change in a Specific Cell example If value in "D1" is " Player 1" then The Text on Command Button Also is "Player 1"

what i self have done so far was Searching around Google and Didn realy find what i was looking for
 
Did you press the ENTER key after you entered a new value in D1?
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Then I have no idea why it isn't working for you. It's working for me. What version of Excel are you using? Do you have macros enabled in Excel?
 
Upvote 0
The coding is very basic so it actually should work for any version of Excel. Do you have macros enabled in Excel?
 
Upvote 0
Place this version in the worksheet code module for the "Cup 8 2nd Chance (2)" sheet.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.CountLarge > 1 Then Exit Sub
    If Target.Address(0, 0) <> "D1" Then Exit Sub
    ActiveSheet.Shapes.Range(Array("Button 2")).Select
    Selection.Caption = Target
End Sub
 
Upvote 0
THANK YOU FOR THE HELP! WHAT AND WHEN AND HOW I DONT KNOW But i works Now
only thing i did was Restart my Laptop.....

and put your Code with Msgbox as new Future....
i have make a Opostrof so the line with Msgbox wont Appear evertime
Thanks alot again

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Address(0, 0) <> "D1" Then Exit Sub
' MsgBox ("If you see this message, the macro is executing.")
ActiveSheet.Shapes.Range(Array("Button 2")).Select
Selection.Caption = Target
End Sub
 
Upvote 0
You are very welcome. :) Make sure you delete the macro in the standard code module if it still there.
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,838
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top