LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Issues with time clock

I was hoping I could get some help on a time clock like function I had
created previously with some help from this site. As it currently stands, I
have a working time clock-like macro for use in an excel program. The
current code is:

Sub TimeStampStart()
Const TimeStampColumn As String = "D"
Const PWORD As String = ""
ActiveSheet.Unprotect PWORD
Dim X As Long
Dim LastUsedRow As Long
With ActiveSheet
LastUsedRow = .Cells(Rows.Count, TimeStampColumn).End(xlUp).Row
.Cells(LastUsedRow - (.Cells(LastUsedRow, TimeStampColumn). _
Value < ""), TimeStampColumn).Value = Now
End With

Const DateStampColumn As String = "A"
Dim Y As Long
Dim LastUnusedRow As Long
With ActiveSheet
LastUnusedRow = .Cells(Rows.Count, DateStampColumn).End(xlUp).Row
If .Cells(LastUnusedRow, DateStampColumn).Value < "" Then
LastUnusedRow = LastUnusedRow + 1
End If
.Cells(LastUnusedRow, DateStampColumn).Value = Date
.Cells(LastUnusedRow, TimeStampColumn).Value = Time
End With
ActiveSheet.Protect PWORD
ActiveWorkbook.Save

End Sub

The current issue I am having is that a potential employee could clock into
a new job (if they changed to a different project) and forget to clock out of
their old job. I am wondering if there is any way that when an employee runs
the above macro, it could check to see if the previous row had an entry
filled in for column F, the time out column. Any help would be appreciated,
thank you.

P.S. I posted a similar message on Tuesday and hadn't received a response
so I thought I should post again because it may have been missed. I
apologize if this is improper etiquette.
 
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
Incremental time values based upon clock in and clock out times saltnsnails Excel Discussion (Misc queries) 8 January 13th 09 08:11 PM
Time Clock - Making sure they clock out valiant Excel Programming 1 June 4th 08 03:22 PM
How do I calculate time in excel (clock in and clock out chad Excel Discussion (Misc queries) 3 January 7th 08 10:09 PM
Change EXCEL Clock to Standard Clock or Military Time YoMarie Excel Worksheet Functions 4 April 29th 07 08:39 PM
can cell's act like time clock at a certen time/date for payments Colin2u Excel Discussion (Misc queries) 6 August 5th 05 12:20 AM


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