|
-
Sep 24th, 2002, 06:52 PM
#1
Thread Starter
Junior Member
Wow, I am an idiot
Okay, I need to know how to have an increment stop in a certain event. Let me explain. I have 5 variables, A - E. I also have variable F. All of them are integers. Well, I set a command button to increment A - E, and decrease that amount from F. A - E have their own command button, but all subtract from F. Well, when F = 0, I dont want them to be able to increment A-E or or subtract from F anymore.
I did this 2 years ago with the help of my friend, and now that I am in class I decided to restart the project. Unfortunatly, I forgot how to do this easy little step. Anyone give me some advice...? Ya dont have to tell me how, just point me in the right direction... heh.
-
Sep 24th, 2002, 06:56 PM
#2
Hyperactive Member
Well..in the method where you increment A-E and decrement F, just place a check before that where If F= 0 Then Exit Sub..or you could disable the command buttons when F reaches 0..there are several ways you could do this
And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.
-
Sep 24th, 2002, 06:57 PM
#3
Disable the 'subtract' button when F= 0.
eg. cmdSubtract.Enabled = False
-
Sep 24th, 2002, 07:08 PM
#4
Need-a-life Member
VB Code:
cmdSubtract.Enabled = (F <> 0)
would do the trick...
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Sep 24th, 2002, 07:11 PM
#5
Thread Starter
Junior Member
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
|