Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
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

Thanks in advance, David D

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default simple command button question

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



On Jul 11, 1:59 pm, "David" wrote:
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple question on With command teepee[_3_] Excel Discussion (Misc queries) 2 December 26th 08 06:27 PM
Command Button Question Bob Phillips Excel Programming 0 January 2nd 07 10:50 PM
Command Button question Giselle[_2_] Excel Programming 7 January 28th 06 03:20 AM
command button question Gary Keramidas[_2_] Excel Programming 4 June 18th 05 08:24 PM
Command Button Question Todd D. Levy Excel Programming 4 July 7th 04 03:18 PM


All times are GMT +1. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"