Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,075
- Office Version
- 2019
- Platform
- Windows
I have this if/then statement that doesn't run correctly. lbSL is a label on a userform that displays 5.5% and it should execute the first part of the if/then statement. However, it executes the second part of the if/then statement. My guess the code does not recognize the lbSl.Caption as a value. Can someone assist thank you.
lbSL.Caption = 5.5%
lbSL.Caption = 5.5%
Code:
If lbSL.caption < "15%" Then
lbRatio = "Ok"
lbRatio.ForeColor = vbBlue
Else
lbRatio = "Caution"
lbRatio.ForeColor = vbRed
End If