lundi 13 janvier 2020

Userform checkbox questions

Can anyone tell me how to code my userform checkboxes to disallow checking by the user, but unchecking only? I have a travel userform that contains checkboxes if the user is eligible for specific meals based on the time of their travel. I want the user to be able to remove a checkbox if they were provided a meal at the travel event or function but I do not want them to be able to add checkboxes to meals that they are not eligible to receive. My coding for the meal checkboxes is below:

'''MEALS ALLOWED PER SPREADSHEET TO USERFORM'''
If Sheets("Travel Expense Voucher").Range("Data_Start").Offset(TargetRow, 28).Value = "T" Then
frmUserTravel.chkMorning = Checked
Else: frmUserTravel.chkMorning = Unchecked
End If

If Sheets("Travel Expense Voucher").Range("Data_Start").Offset(TargetRow, 30).Value = "T" Then
frmUserTravel.chkMidday = Checked
Else: frmUserTravel.chkMidday = Unchecked
End If

If Sheets("Travel Expense Voucher").Range("Data_Start").Offset(TargetRow, 32).Value = "T" Then
frmUserTravel.chkEvening = Checked
Else: frmUserTravel.chkEvening = Unchecked
End If
'''END MOVEMENT OF MEALS ALLOWED TO USERFORM'''



Aucun commentaire:

Enregistrer un commentaire