User form - I'm really confused now

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Here is what I'm trying to do, and maybe it just can't be done.

I have put a game (wari) into a user form. There are 6 option buttons for the user (the user picks 1). Once the user picks a button, the values in 12 text boxes can change. Ok. AFter the user picks a button the computer will "move" which will entail the values changing in the 12 text boxes. The the user can pick again. I think I am asking: How does the userform know to pass control back to the option button?

Gene, "The Mortgage Man", Klein
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
mortgageman said:
AFter the user picks a button the computer will "move" which will entail the values changing in the 12 text boxes. The the user can pick again. I think I am asking: How does the userform know to pass control back to the option button?

Gene, "The Mortgage Man", Klein

Why not use Application.OnTime to create a time delay, and then use a MsgBox to inform the user they may move again (after you clear the textboxes)? HTH
 
Upvote 0
But I do I "tell the userform" that the user has "moved" (picked one of his or her six option buttons) and the program a change of state in the userform (change the value of the text boxes), and then reshow the userform?

IOW I am trying to do something like this

function game()
DO
show userform
do stuff based on user's choice of option button
have computer respond and show response in userform
loop back to DO




Gene, "The Mortgage Man", Klein
 
Upvote 0
If you're in the OptionButton_Change() (or Click()) event, then the user has selected a button. Then you can wait, update the userform for the computer's "moves" and have a MsgBox state that the computer has taken its turn.
 
Upvote 0

Forum statistics

Threads
1,206,759
Messages
6,074,777
Members
446,087
Latest member
PinkFloyd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top