|
It is currently Thu Jan 08, 2009 5:47 am
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 2 posts ] |
|
| Author |
Message |
|
mesmerized
|
Post subject: Timer - Newbie! Posted: Wed May 04, 2005 11:37 am |
|
Joined: Wed May 04, 2005 11:32 am Posts: 0
|
|
Hey people I have been asked to do a counter/timer with two command buttons one for counting up and one for counting down also a menu with different time intervals. As far as I know I have done the menu bit but stuck on the timer code.
I have two command buttons and I have set a varible called blnCountDown as a boolean. In cmd_CountUp i have set the variable to False and in cmd_CountDown i have set the variable to true.
This is the code for me timer:
Private Sub tmrTimerOne_Timer()
Total = txtDisplay.Text
If blnCountDown = True Then
Total = Total - 1
Else
Total = Total + 1 'but on this line i have an error wen i run it and it sats mismatch...can u help!
End If
txtDisplay.Text = Total
End Sub
Any help would be gr8 iam kinda new to this!
|
|
| Top |
|
 |
|
dafunkymunky
|
Post subject: Posted: Thu May 05, 2005 10:37 am |
|
 |
| 100+ Club |
 |
Joined: Fri Apr 08, 2005 8:32 am Posts: 179 Location: India
|
|
hi mesmerized
this is the problem
when you give Total = txtDisplay.Text
total is assigned the string value of the text box
to get the numerical value of the text box the command is
Total = Val(txtDisplay.Text )
now you can add or subtract from total
this should work in case you get the solution dont forget to make the topic as solved the soilved tag can be found at the bottom of the posts..
--DAFUNKYMUNKY
_________________ --------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|