I'm working with some checkboxes on a userform, and am checking if they have been checked by the user in my code. The question I'm running into is in how to properly check for this condition. I've found several examples, and am wondering where I may run into trouble with each.
For example, I have seen several snippets use:
If checkBox1.Value = "True" Then
or
If checkBox1.Value Then
or
If checkBox1 Then
Is there any functional difference between these? It seems like the latter is the shortest, most succinct application, however the engineer's brain in me is saying there must be a reason for the other two cases (although the more I work with VBA, the less I believe in that concept).
Any assistance or guidance you could provide would be appreciated.
Aucun commentaire:
Enregistrer un commentaire