|
-
Jul 1st, 2002, 09:32 PM
#7
Junior Member
To keep track of how many clicks there are, you just need a variable. Let's suppose we call it n_Clicks. You'd do n_Clicks = n_Clicks + 1 every time a button is clicked.
As for a random button being selected... It would be much easier to create a control array. Just create a single button in the upper-left corner and call it, say, ClickButton. Give it the index '0'. Next, using for... to...'s, spawn all your buttons in your Form_Load. They'll all have a unique number. Create a variable to hold the current button being clicked (like, say, CurrentButton). When the user clicks it, do the following...
ClickButton(CurrentButton).value = vbunchecked
CurrentButton = int(rnd * (max amount of buttons))
ClickButton(CurrentButton).value = vbchecked
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
|