You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1.Text = vbNullString Then
MsgBox "Value required"
Cancel = True
End If
End Sub
The Cancel = True line triggers the ObjectVariableNotSetInspection (twice, but that's likely a different issue...). In this case, Set isn't required because the RHS of the assignment is a value type and the LHS is a reference type.
Second issue with the same code as #2601:
In a
UserForm
withTextBox1
:The
Cancel = True
line triggers theObjectVariableNotSetInspection
(twice, but that's likely a different issue...). In this case,Set
isn't required because the RHS of the assignment is a value type and the LHS is a reference type.Also related: #2504
The text was updated successfully, but these errors were encountered: