Link to home
Create AccountLog in
Avatar of swansonplace
swansonplace

asked on

If you assign a value but it is invalid how to send back a flag

In the below code, I would only like to assign values that are greater than 0.

How do I send back a flag to say that is was not assigned to the property.
If I did this would it be a standard practice.

Public Property Let ExchangeRate(value As Double)
    If mExchangeRate <> value Then
        mExchangeRate = value
        mIsDirty = True
    End If
End Property

Avatar of Mark_FreeSoftware
Mark_FreeSoftware
Flag of Netherlands image


You could use a messagebox to notify the user
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.