lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I just watched a video. He created a form then inserted a label and a command button. Then he made the label Caption =1, then clicked on command button and wrote the code below.
So when a user click the button the caption will increment by 1
Why is that? I changed the caption from 1 to Hello and the code stopped working. I thought the caption is a text, even when I type 1 it should be considered as a text, no? Thank you so much.
I just watched a video. He created a form then inserted a label and a command button. Then he made the label Caption =1, then clicked on command button and wrote the code below.
So when a user click the button the caption will increment by 1
Why is that? I changed the caption from 1 to Hello and the code stopped working. I thought the caption is a text, even when I type 1 it should be considered as a text, no? Thank you so much.
Code:
Private Sub myadd_Click()
myform.mycount.Caption = myform.mycount.Caption + 1
End Sub
Last edited: