Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Simple Math Addition

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
simple addition pitydafool Excel Discussion (Misc queries) 4 January 30th 09 10:44 PM
Simple Math ? Steve B Excel Discussion (Misc queries) 6 January 7th 09 05:59 PM
Simple Math acss Excel Worksheet Functions 9 June 25th 08 07:02 PM
help with simple addition formula Juco Excel Worksheet Functions 1 January 29th 05 12:51 PM
Need simple VBA math help CLR Excel Programming 2 February 13th 04 03:06 AM


All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"