HELP! Button to Increment a Value in a TextBox

bryskie

New Member
Joined
Jun 21, 2019
Messages
16
Good Day Ma'am's and Sir's

I am currently trying to make a working system for sales and inventory. I need some help coding for which i have a userform which has 1button and 1textbox, which when you click the button the textbox display a number 1 value, and every time i will click the button the value will increase.

how to code that?

i am just a beginner in coding, the basic knowledge i have is through watching youtube.

THANKS!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Put this into the userform's initialize event:
Code:
Private Sub UserForm_Initialize()
Me.TextBox1.Value = 0
End Sub
..... and this into the commandbutton's _click event:
Code:
Private Sub CommandButton1_Click()
Me.TextBox1.Value = Me.TextBox1.Value + 1
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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