Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multipling the value of 3 text boxes


Ok, this one should be easy, but it has me stumped. I am not finding an
good lead on the net either.

Here is the problem. I want to multiply the value of three text boxe
and put the resulting value into a forth text box. This value will b
calculated on a change event. I know this can be done in code, but
haven't the foggiest where to begin.

Any suggestions?

Thanks in advance,
Amber :confused

--
Amber_D_Law
-----------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...fo&userid=3001
View this thread: http://www.excelforum.com/showthread.php?threadid=51373

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Multipling the value of 3 text boxes

Text boxes where?

Tim

--
Tim Williams
Palo Alto, CA


"Amber_D_Laws"
wrote in message
news:Amber_D_Laws.23dveo_1140196208.4835@excelforu m-nospam.com...

Ok, this one should be easy, but it has me stumped. I am not finding any
good lead on the net either.

Here is the problem. I want to multiply the value of three text boxes
and put the resulting value into a forth text box. This value will be
calculated on a change event. I know this can be done in code, but I
haven't the foggiest where to begin.

Any suggestions?

Thanks in advance,
Amber


--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile:

http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=513735



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multipling the value of 3 text boxes


On a multi-page user form.

Amber

Tim Williams Wrote:
Text boxes where?

Tim

--
Tim Williams
Palo Alto, CA


"Amber_D_Laws"

wrote in message
news:Amber_D_Laws.23dveo_1140196208.4835@excelforu m-nospam.com...

Ok, this one should be easy, but it has me stumped. I am not finding

any
good lead on the net either.

Here is the problem. I want to multiply the value of three text

boxes
and put the resulting value into a forth text box. This value will

be
calculated on a change event. I know this can be done in code, but I
haven't the foggiest where to begin.

Any suggestions?

Thanks in advance,
Amber


--
Amber_D_Laws

------------------------------------------------------------------------
Amber_D_Laws's Profile:

http://www.excelforum.com/member.php...o&userid=30012
View this thread:

http://www.excelforum.com/showthread...hreadid=513735



--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=513735

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multipling the value of 3 text boxes


Any one else think they can help?

Amber :)


--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=513735

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Multipling the value of 3 text boxes

Maybe something like:

Option Explicit
Private Sub TextBox1_Change()
Call TBChange
End Sub
Private Sub TextBox2_Change()
Call TBChange
End Sub
Private Sub TextBox3_Change()
Call TBChange
End Sub
Private Sub TBChange()
Dim myValue As Double
myValue = 0
If IsNumeric(Me.TextBox1.Value) Then
myValue = myValue + CDbl(Me.TextBox1.Value)
End If
If IsNumeric(Me.TextBox2.Value) Then
myValue = myValue + CDbl(Me.TextBox2.Value)
End If
If IsNumeric(Me.TextBox3.Value) Then
myValue = myValue + CDbl(Me.TextBox3.Value)
End If

'formatted?
Me.TextBox4.Value = Format(myValue, "00.00")
End Sub


Amber_D_Laws wrote:

Any one else think they can help?

Amber :)

--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=513735


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multipling the value of 3 text boxes


That's great Dave, but a little more complicated than I expected.
If I were doing this in the worksheet it would be...

A3*A4*A5

but, this is the userform, and they are textboxes, so I was expecting
something more along the lines of

(txtUnitPrice.Value*txtTATMultiplier*txtSampleNum) .Value =
txtTotalPrice

of course, I could be completly off base. I have to admit, I don't even
follow the logic of your code. I can't tell where the multiplication is
happening. Let me know. The txt's above are the names of the textboxes.
Sorry if my earlier posts were unclear. I forget sometimes that you all
are not in my head and might not know what I am talking about.

Ha!
Thanks again Dave,
Amber :)



Dave Peterson Wrote:
Maybe something like:

Option Explicit
Private Sub TextBox1_Change()
Call TBChange
End Sub
Private Sub TextBox2_Change()
Call TBChange
End Sub
Private Sub TextBox3_Change()
Call TBChange
End Sub
Private Sub TBChange()
Dim myValue As Double
myValue = 0
If IsNumeric(Me.TextBox1.Value) Then
myValue = myValue + CDbl(Me.TextBox1.Value)
End If
If IsNumeric(Me.TextBox2.Value) Then
myValue = myValue + CDbl(Me.TextBox2.Value)
End If
If IsNumeric(Me.TextBox3.Value) Then
myValue = myValue + CDbl(Me.TextBox3.Value)
End If

'formatted?
Me.TextBox4.Value = Format(myValue, "00.00")
End Sub


Amber_D_Laws wrote:

Any one else think they can help?

Amber :)

--
Amber_D_Laws

------------------------------------------------------------------------
Amber_D_Laws's Profile:

http://www.excelforum.com/member.php...o&userid=30012
View this thread:

http://www.excelforum.com/showthread...hreadid=513735

--

Dave Peterson



--
Amber_D_Laws
------------------------------------------------------------------------
Amber_D_Laws's Profile: http://www.excelforum.com/member.php...o&userid=30012
View this thread: http://www.excelforum.com/showthread...hreadid=513735

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
Default font for pasted text in text boxes - Excel 2007 MS OFFICE USER EIT Excel Discussion (Misc queries) 0 March 25th 10 09:01 PM
User Form Text Boxes - Copy format of text boxes NDBC Excel Discussion (Misc queries) 3 July 2nd 09 02:02 AM
Multipling 2 columns Tami Excel Worksheet Functions 9 June 7th 09 01:59 PM
How do I link Text Boxes to Cells, not Cells to Text Boxes? Ebby Excel Worksheet Functions 1 May 15th 07 11:31 PM
changing the multipling factor on large spreadsheet Office Jnr Excel Discussion (Misc queries) 17 November 12th 06 05:21 PM


All times are GMT +1. The time now is 07:36 PM.

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"