Hello, I am, not sure if my situation has been addressed before.
Here is my issue:
In excel, I have made a board game.
I have a PLAY button in P9 among other buttons (macros) ALSO in column P, which I want unavailable while the game is waiting for the player.
The player must decide to press which one of two gameplay 'yes/no' buttons (macros) in either e12:f12 or m12:n12.
If they press the play button, or type anything anywhere, errors will come up.
I am stumped as to how to make this work.
I attempted to lock the entire sheet with the exception of those needed ranges was:
ActiveSheet.Protect
Range("E12:F12").Locked = False
Range("M12:N12").Locked = False
DO
If Range("Action") > 0 Then
Exit Do
End If
DoEvents
Loop
When testing, I receive an error that it is unable to do the specified action to the specified cells.
I have successfully made a msgbox with yes or no that does exactly what I need. The rest of the game is blocked out by a spinning cursor while the msgbox is up waiting for an answer. But ultimately I don't want a message box in the final game. Just on screen buttons and the ability to block other buttons when appropriate to prevent errors that happen if they are pressed at the wrong times.
Fixing this issue is pretty much the last step before I compile the game to standalone EXE.
Thanks in advance!
Chris
Here is my issue:
In excel, I have made a board game.
I have a PLAY button in P9 among other buttons (macros) ALSO in column P, which I want unavailable while the game is waiting for the player.
The player must decide to press which one of two gameplay 'yes/no' buttons (macros) in either e12:f12 or m12:n12.
If they press the play button, or type anything anywhere, errors will come up.
I am stumped as to how to make this work.
I attempted to lock the entire sheet with the exception of those needed ranges was:
ActiveSheet.Protect
Range("E12:F12").Locked = False
Range("M12:N12").Locked = False
DO
If Range("Action") > 0 Then
Exit Do
End If
DoEvents
Loop
When testing, I receive an error that it is unable to do the specified action to the specified cells.
I have successfully made a msgbox with yes or no that does exactly what I need. The rest of the game is blocked out by a spinning cursor while the msgbox is up waiting for an answer. But ultimately I don't want a message box in the final game. Just on screen buttons and the ability to block other buttons when appropriate to prevent errors that happen if they are pressed at the wrong times.
Fixing this issue is pretty much the last step before I compile the game to standalone EXE.
Thanks in advance!
Chris