Results 1 to 3 of 3

Disable Button after one click user wise

Threaded View

  1. #1
    Registered User
    Join Date
    07-08-2011
    Location
    USA
    MS-Off Ver
    MS Office Home and Student 2019
    Posts
    25

    Disable Button after one click user wise

    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
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1