Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Assistance plz...troubling program..but so easy!
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
love_rox




PostPosted: Sun Apr 10, 2005 9:39 am   Post subject: Assistance plz...troubling program..but so easy!

hey guys...im having trouble with a program...mind helping me?

okay, well i need to write a section of code that accepts a number, displays it in a label, and then repeats the entire process. However, the program needs to stop when the number entered is 0.999.

i know im doing something wrong coz my program is screwed up!
code:
Private Sub cmdEnd_Click()
'Ends the Program
End
End Sub

Private Sub cmdEnter_Click()
'declare variables
intNum = Val(Text1.Text)
Do While intNum <> 0.999
'Displays number in a label
lblDisplay = intNum
Loop
End Sub


please assist me as soon as possible..thanks!
Sponsor
Sponsor
Sponsor
sponsor
Brightguy




PostPosted: Tue Apr 12, 2005 9:16 am   Post subject: Re: Assistance plz...troubling program..but so easy!

Take out the loop, since it will never end and thus you won't be able to change the text.

Whenever the button is clicked, the Click() procedure is run. So within this procedure check if the text is 0.999, and then exit the program if it is.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: