- Prepare images of Rock, Paper, and Scissors
- Open VBE
- Create form
- Create the parts
※Please correct my English if you find any mistakes. Thank you.
Save as "xlsm" with any name.
Prepare images of Rock, Paper, and Scissors
You can just show the text Rock, Paper, and Scissors, but It is boring, I think.
You can draw them, take photos, or copy them from websites and save them as "bmp", or "jpg".
* In Japanese law, we can use pictures or drawings just for ourselves as long as they are not in public.
Please obey your country's laws for copyright issues.
[Developer] tab > [Visual Basic]
Check this article for more detail.
Might be Saying "Creating the screen of the game" is more understandable for beginners.
Go [Insert] > [Userform] and the new user form will be added and appear with the toolbox.
You might lose it if your monitor is big or using multiple monitors but the toolbox appears somewhere for sure.
Let's make the game appearance referring to the draft drawing.
Create the parts
Add the labels on the form.
Those are labels in red frames.
Those properties are below.
Change favorable font type, font size, and font color.
Add three option buttons.
Properties for option buttons
Add images for showing pictures you and the computer selected.
Properties for the images.
They are also images but the setting is a bit different.
Set the size smaller and you have to have the pics of Rock, Paper, and Scissors on your PC.
Click the image and go to the [Piture] property.
Explore will appear when you click the three dots button for selecting bitmap picture.
Properties for images.
The difference from the other images is these three images are not visible as a default.
These images will appear on imgYou or imgComp when you play the game.
Add three command buttons.
Properties for command buttons.
I will write a macro for next time.