View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default simple command button question

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