LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Date and time stamp, control button

I put a commandbutton from the control toolbox on a worksheet.

I added a worksheet called LogSheet to the workbook. I put headers in row 1.

Then I used this code under the commandbutton:

Option Explicit
Private Sub CommandButton1_Click()
Dim DestCell As Range
With Worksheets("LogSheet")
Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With

With DestCell
.Value = Application.UserName
With .Offset(0, 1)
.Value = Now
.NumberFormat = "mm/dd/yyyy hh:mm:ss"
End With
End With

End Sub

I wasn't sure what else you want to keep track of, though. I just used the
username (from tools|Options|General tab) and the date/time.



MattB wrote:

I have a speardsheet I use to track sales calls. As of now it only tracks
totals by means of a control button that acts as a counter. (upon clicking
the button, it adds "1" to a cell for a total.) What I would like to do is
add to the control button so that each click is recorded seperately and date
and time stamped, preferably on a seperate sheet. any suggestions? (I'm not
the most educated on Visual Basics, I would be more than happy to e-mail what
I have now if that would be easier.)


--

Dave Peterson


 
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
Can excel have a button to input (stamp) the systems date and/or . abe Excel Worksheet Functions 5 April 24th 07 10:00 PM
Date-Time Stamp [email protected] Excel Discussion (Misc queries) 1 September 27th 06 02:37 PM
Time/Date Stamp: 'control+' not working for me... babs Excel Discussion (Misc queries) 8 March 8th 06 11:38 PM
Create a button that will date stamp todays date in a cell Tom Meacham Excel Discussion (Misc queries) 3 January 11th 06 01:08 AM
date/time stamp Jan Excel Worksheet Functions 7 July 14th 05 01:04 PM


All times are GMT +1. The time now is 12:09 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"