View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Dave Peterson/JLatham Command Button

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1" '<=== change to suit

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then

Worksheets("Sheet1").Buttons("myButton").Caption = Target.Value
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--
__________________________________
HTH

Bob

"aussiegirlone" wrote in message
...
The Question I wrote:
I have a command button that when clicked it goes to another sheet
And it works beautifully thanks to other members, I named this button
Sunday. now I wish this same buttons name to change automatically when I
change a date on a different worksheet. Is this possible?
I'm so excited! Your code worked
Thankyou
Aussiegirlone