Pulseless9
New Member
- Joined
- Jan 13, 2020
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hello,
I have created an excel spreadsheet that uses some great info from Hiker95 to track event attendance checkin and checkout of attendees. I am able to scan a barcode on an ID card and update the time in and time out.
I need to make the spreadsheet more functional.
Some of my attendees need to return the next day for specific events. I want to be able to scan the card, find the record as it does currently, and in addition to check them out of the event populate a column for event A with an X and a column for event B with an X or populate a column for 100% complete with an X to indicate no further attendance. My skill and knowledge are unable to match my imagination for what I want to do. If someone can review my code and help me populate accordingly that would be amazing
VBA for checkout form pasted below. The four option buttons are what I am using to display return activity status.
I have created an excel spreadsheet that uses some great info from Hiker95 to track event attendance checkin and checkout of attendees. I am able to scan a barcode on an ID card and update the time in and time out.
I need to make the spreadsheet more functional.
Some of my attendees need to return the next day for specific events. I want to be able to scan the card, find the record as it does currently, and in addition to check them out of the event populate a column for event A with an X and a column for event B with an X or populate a column for 100% complete with an X to indicate no further attendance. My skill and knowledge are unable to match my imagination for what I want to do. If someone can review my code and help me populate accordingly that would be amazing
VBA for checkout form pasted below. The four option buttons are what I am using to display return activity status.
VBA Code:
Private Sub CommandButton10_Click()
'validation
If Me.TextBox10.Value = "" Then
MsgBox "Please Scan CAC", vbCritical
Exit Sub
End If
'Check Duplicate Scan
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Sheet1")
Dim n As Long
If Application.WorksheetFunction.CountIf(sh.Range("A:A"), Me.TextBox10.Value) = 0 Then
MsgBox "This Member is NOT checked in.", vbCritical
Exit Sub
End If
'Find Next Empty cell
n = sh.Range("A" & Application.Rows.Count).End(xlUp).Row
'unprotect sheet
sh.Unprotect "1234"
'populate data
sh.Range("A" & n + 1).Value = Me.TextBox10.Value
If Me.OptionButton1.Value = True Then
sh.Range("M" & n + 1).Value = "X"
Else
End If
If Me.OptionButton2.Value = True Then
sh.Range("N" & n + 1).Value = "X"
Else
End If
If Me.OptionButton1.Value = True Then
sh.Range("O" & n + 1).Value = "X"
Else
End If
If Me.OptionButton1.Value = True Then
sh.Range("P" & n + 1).Value = "X"
Else
End If
'protect sheet
sh.Protect "1234"
Me.TextBox10.Value = ""
ChkOtFm.TextBox10.SetFocus
MsgBox "Member Checked Out Succesfully"
ChkOtFm.Hide
ChkInFm.TextBox1.SetFocus
End Sub
Private Sub CommandButton11_Click()
Me.TextBox10.Value = ""
Me.OptionButton1.Value = False
Me.OptionButton2.Value = False
Me.OptionButton3.Value = False
Me.OptionButton4.Value = False
ChkOtFm.TextBox10.SetFocus
End Sub
Private Sub OptionButton4_Click()
End Sub
Private Sub UserForm_Click()
End Sub
Last edited by a moderator: