VBA Form and Label Question

UpTheArgyle

Board Regular
Joined
Jan 12, 2006
Messages
179
Hi

I have a text box displaying balance (which is 50)
When a button is clicked i want the balance to reduce by 5
I just cant seem to make this happen!

Can someone give me the code to reduce the balance by 5 and display is in the text box please?

Private Sub UserForm_Activate()

Dim balance As Integer
balance = 50
txtbal.Text = balance

End Sub


Private Sub cmdstart_Click()

???????????????????????????????

End Sub



Thanks Very Much !
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,190,736
Messages
5,982,654
Members
439,789
Latest member
Justhavinaltlfun2002

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
Top