Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Further to Nick's reply, you'll need to have a numeric start value
(presumably zero) or it will raise an error. Right click the text box and select Properties. Then enter zero (0) in the Value field. If you for some reason prefer it to be blank on open then perhaps this: Private Sub CommandButton10K_Click() With Me.TextBoxMileageValue If .Value = "" Then .Value = 10000 _ Else .Value = .Value + 10000 End With End Sub Regards, Greg "ssjody" wrote: Don't Laugh. I just need to know how to force a value in a textbox to increase by a set amount when I click on a button. I know this code is not right but it will give you the idea of what I want to do. Private Sub CommandButton10K_Click() Me.TextBoxMileageValue.Value Plus 10000 End Sub When I click the CommandButton10K I just want the value in the TextBoxMileageValue to increase by 10,000 How do I do that? Thanks Jody -- ssjody ------------------------------------------------------------------------ ssjody's Profile: http://www.excelforum.com/member.php...o&userid=33398 View this thread: http://www.excelforum.com/showthread...hreadid=563595 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
simple addition | Excel Discussion (Misc queries) | |||
Simple Math ? | Excel Discussion (Misc queries) | |||
Simple Math | Excel Worksheet Functions | |||
help with simple addition formula | Excel Worksheet Functions | |||
Need simple VBA math help | Excel Programming |