Resolved:Wheres Waldo (or the problem :p)
VB Code:
If ComboInLabel.Caption = "Centimeters (Cm)" Or "Meters (M)" Or "Kilometers (Km)" Then
CompatabilityInType = "Length"
End If
Im getting a type mismatch error, im guessing that IF cannot handle 'or' with strings? only numbers?
thanks in advance
Re: Wheres Waldo (or the problem :p)
VB Code:
If ComboInLabel.Caption = "Centimeters (Cm)" Or ComboInLabel.Caption = "Centimeters (Cm)" 'etc
You have to add the ComboInLable.Caption = after your Or
Re: Wheres Waldo (or the problem :p)
... or use Select Case syntax instead:
VB Code:
Select Case ComboInLabel.Caption
Case "Centimeters (Cm)"
'...
Case "Meters (M)"
'...
Case "Kilometers (Km)"
'...
End Select
'OR
Select Case ComboInLabel.Caption
Case "Centimeters (Cm)", "Meters (M)", "Kilometers (Km)"
'...
End Select
Re: Wheres Waldo (or the problem :p)
thanks both of you,
especially rhino (yet again :wave: )
I wanted to use Case, however when i had tried it i had the synatx wrong, i had the Case of in brackets....
anyways cheers :D
Re: Resolved:Wheres Waldo (or the problem :p)
Do they make those books anymore? :)
Re: Resolved:Wheres Waldo (or the problem :p)
Quote:
Originally Posted by epod69
Do they make those books anymore? :)
I can write one for you ... ;) :D
Re: Wheres Waldo (or the problem :p)
Quote:
Originally Posted by d22k
thanks both of you,
especially rhino (yet again :wave: )
I wanted to use Case, however when i had tried it i had the synatx wrong, i had the Case of in brackets....
anyways cheers :D
:thumb:
Re: Resolved:Wheres Waldo (or the problem :p)
Quote:
Originally Posted by RhinoBull
I can write one for you ... ;) :D
Well if it was anything like the books I read (well umm seen), I think it would take you a few days to do so =P