Hey all, I have a UserForm that contains checkboxes... the code attempts to transfer the data from the checkboxes to the first empty cell (in a certain column) in the Sheet named "Shipments"... yet when I enter the data... it always goes into the sheet which is active... not only the Shipments sheet... what am I doing wrong?
Code:
'CHECKBOXESDim lRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Shipments")
'find first empty row in database
lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
'Determine if checkboz is true or false and assing a value
With ws
If CheckBox1.Value = True Then Cells(lRow, 14).Value = "Yes"
If CheckBox1.Value = False Then Cells(lRow, 14).Value = "No"
End With