I'm trying to create a wordle game but I'm not sure how to display strings textbox when button is clicked. For example, in this
,
when letter "A" is clicked, the first row of the first textbox will display "A". If letter "B" is clicked, the first textbox will display "B" etc. I want to make it so that it can spell out a word using the buttons and textboxes(grid). I tried
tb1.text = cmdbtn1.caption
but I didn't get the expected result. I'm not sure if I have to use for loop to do so. Please give some suggestions. Thanks.
This is one of the button events that is used throughout the program
Private Sub cmdbtn1_Click()
'code here
end sub
We need to track the active Textbox. If all the controls directly on the Userform, the Userform's ActiveControl changes to the Button when it is clicked. We could track the active Textbox using each Textboxes' Exit event.
But this is a lot of extra work. Alternately, we can place all the textboxes in a Frame control. The Frame's ActiveControl will not change when a Button outside of the Frame is clicked.
We also need call a subroutine to process the button clicks.