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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,214,653
Messages
6,120,755
Members
448,989
Latest member
mariah3

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