Hey! T. Valko

A

aussiegirlone

If one is allowed to smile at comments like these then I have a very big
smile thanks for that (LOL)
 
T

T. Valko

Ooops!

My sincere apologies. I forgot all about this.

I'm on it as soon as I hit the "send" button.
 
A

aussiegirlone

JLatham
Can I ask you a question while you’re here?
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?
Aussiegirlone
 
A

aussiegirlone

I new you would respond to JLathams comment as a little cheakiness goes a
long way. I'm still smiling LOL
 
T

T. Valko

Check your inbox!

--
Biff
Microsoft Excel MVP


aussiegirlone said:
I new you would respond to JLathams comment as a little cheakiness goes a
long way. I'm still smiling LOL
 
J

JLatham

2-timing on T.Valko now are we? :)

What do you mean by "named" - do you mean you actually named it that or that
Sunday is what appears on the button. Also, where did you get the button
from: the Forms menu tools or the Controls Toolbox menu?
 
D

Dave Peterson

You can use a worksheet event under the worksheet that contains the cell.

Rightclick on the worksheet tab with the changing cell. Select view code.
Paste this into the newly opened code window:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
Set myCell = Me.Range("A1")

If Target.Cells.Count > 1 Then
Exit Sub 'one cell at a time
End If

If Intersect(Target, myCell) Is Nothing Then
Exit Sub
End If

Worksheets("sheet1").CommandButton1.Caption _
= Format(myCell.Value, "mmmm dd, yyyy")

End Sub

You'll have to change the cell to look at (I used A1). As well as the other
worksheet's name, the commandbutton's name and use the caption you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top