Tell the program to only use the int command if the caption has a decimal in it.
If label1.caption = ??Contains a . in caption?? then
label2.caption = int(label1.caption)
else
label2.caption = label2.caption
end if
Printable View
Tell the program to only use the int command if the caption has a decimal in it.
If label1.caption = ??Contains a . in caption?? then
label2.caption = int(label1.caption)
else
label2.caption = label2.caption
end if
What is an int command?
Try this
[]PCode:
If InStr(1, label1.caption, ".") then
label2.caption = int(label1.caption)
else
label2.caption = label2.caption
end if
[Edited by PRIVATE1 on 10-20-2000 at 03:07 PM]
Int is integer
Here is how you would do it:
Code:If InStr(1, label1.caption, ".") Then
label2.caption = Int(label1.caption)
End If