simple command button question

  • Thread starter Thread starter David
  • Start date Start date
D

David

I have placed a command button on sheet1 when clicked I need it to insert
todays date i.e. = today() into cell J2

Thanks in advance, David D
 
I have placed a command button on sheet1 when clicked I need it
to insert todays date i.e. = today() into cell J2

Is it a Visual Basic CommandButton? If so, in Design Mode, use this Click
event code...

Private Sub CommandButton1_Click()
Range("J2").Value = Date
End Sub

Rick
 
Attach the button to the following macro

Sub myDate()
ActiveSheet.Cells(2,10).Value = Date
End Sub

(10 being the column number corresponding to "J")

Hope that helps. -Lisa



I have placed a command button on sheet1 when clicked I need it to insert
todays date i.e. = today() into cell J2

Thanks in advance, David D

attach the
 

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

Back
Top