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