Value from Cell Onto Command Button

Hjemmet

Board Regular
Joined
Jun 20, 2018
Messages
203
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
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Change the cell reference (in red) to suit your needs. Please note the button name (in blue). Close the code window to return to your sheet. Enter a value in D1 and press the ENTER key.
Rich (BB 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.CommandButton1.Caption = Target
End Sub
 
Upvote 0
Nohing Happen perhaps it because i AINT have any Userform but Only have Commandbutton insert on sheet's and It's Not Only Value But Text
 
Upvote 0
help.jpg
 
Upvote 0
Try:
Rich (BB 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.Knap 1.Caption = Target
End Sub
 
Upvote 0
You could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here.
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,039
Members
449,063
Latest member
ak94

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