Hi,
I've created a timesheet with user form for Login, Logout, Break start and End buttons. What am looking for is once a user clicks on any of the four buttons, the user should not be allowed to again click the same butotn on same day. This way i can stop overwrite data.
Request your help. Your immediate resolution will be highly appreciated
Attached is the protected worksheet and i've copied my macro for Login button.
Private Sub CommandButton1_Click()
'Your code here
CommandButton1.Enabled = False
'LOGIN BUTTON
Dim iHour As Integer, iMin As Integer, iSec As Integer
Cells(CurRow, "D") = Time
iHour = Hour(Now())
iMin = Minute(Now()) + 30
iSec = Second(Now())
'c.Value = TextBox1.Value ' write amendments to database
Cells(CurRow, "D").Value = Time
Label1.Caption = ""
TextBox1.Value = ""
TextBox1.SetFocus
End Sub
Bookmarks