|
-
Oct 20th, 2000, 01:59 PM
#1
Thread Starter
Hyperactive Member
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
-RaY
VB .Net 2010 (Ultimate)
-
Oct 20th, 2000, 02:03 PM
#2
Member
-
Oct 20th, 2000, 02:05 PM
#3
Hyperactive Member
Try this
Code:
If InStr(1, label1.caption, ".") then
label2.caption = int(label1.caption)
else
label2.caption = label2.caption
end if
[]P
[Edited by PRIVATE1 on 10-20-2000 at 03:07 PM]
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Oct 20th, 2000, 02:08 PM
#4
Fanatic Member
Int is integer
Here is how you would do it:
Code:
If InStr(1, label1.caption, ".") Then
label2.caption = Int(label1.caption)
End If
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|