Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mike
 
Posts: n/a
Default Adding a control button to insert a date in the active cell.

Hello,
I'm trying to make a control button that will populate a static date (Ctrl
+) in the active cell that the person has chosen.
Any input is greatly appreciated.
  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

Mike

Sub NOWDATE()
ActiveCell.Value = Format(Date, "dd-mmm-yy")
End Sub


Gord Dibben Excel MVP

On Tue, 15 Feb 2005 09:41:08 -0800, "Mike"
wrote:

Hello,
I'm trying to make a control button that will populate a static date (Ctrl
+) in the active cell that the person has chosen.
Any input is greatly appreciated.


  #3   Report Post  
Richard
 
Posts: n/a
Default

Try This.

Sub Time_Stamp()
'
' Time_Stamp Macro
'

'
ActiveCell.Offset(0, -1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "h:mm"
ActiveCell.Columns
("A:A").EntireColumn.EntireColumn.AutoFit
End Sub
-----Original Message-----
Hello,
I'm trying to make a control button that will populate a

static date (Ctrl
+) in the active cell that the person has chosen.
Any input is greatly appreciated.
.

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
Insert date in macro George Gee New Users to Excel 12 April 17th 06 05:44 AM
How do I insert the date using a macro tara0801 Excel Discussion (Misc queries) 4 February 10th 05 09:09 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
assign a macro to a control button ewan72 Excel Discussion (Misc queries) 1 December 3rd 04 02:04 PM
Embed command button from the control toolbox doesnt work Roland Excel Worksheet Functions 0 November 16th 04 02:20 AM


All times are GMT +1. The time now is 11:32 PM.

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

About Us

"It's about Microsoft Excel"