Seems weird that you can multiply textbox values fine but not add them.
That is because VBA is smart enough to know that when you want to multiply
something in two textboxes that they are really numbers, but when you add
them they could be text strings instead of numbers. With that said, you
need to use the "val" function:
TextBox5.Value = val(TextBox1.Value) + val(TextBox2.Value) +
val(TextBox3.Value) + val(TextBox4.Value)
This tells VBA to treat the text as values. For example, if TextBox1 held
"Bill" and TextBox2 held "Foley", the following would result in:
TextBox1 + TextBox2 = BillFoley
Hope that helps! Got to get back to class.
--
Bill Foley
www.pttinc.com
Microsoft PowerPoint MVP
Microsoft Office Specialist Master Instructor
"Eduardo" <(E-Mail Removed)> wrote in message
news:F757A55C-F104-478C-A975-(E-Mail Removed)...
> Hi Bill,
>
> Thanks for the sample...
>
> How can you add values (vs. multiple)? I am finding that placing a plus
(+)
> concatenate the values entered in the fields. Please see the following
below:
>
> Your help as always is appreciated.
>
> Ed
>
>
> Private Sub Clear_Click()
> TextBox1.Value = ""
> TextBox2.Value = ""
> TextBox3.Value = ""
> TextBox4.Value = ""
> TextBox5.Value = ""
> End Sub
>
> Private Sub Calculate_Click()
> On Error GoTo Err1
> TextBox5.Value = (TextBox1.Value) + (TextBox2.Value) + (TextBox3.Value) +
> (TextBox4.Value)
> GoTo Done
> Err1:
> MsgBox "You must enter numbers in both P&I, Life Ins, Taxes, and HOA
before
> calculating", vbOKOnly, "Calculating Error Message"
> Done:
> End Sub
>
>
>
>
>
> "Bill Foley" wrote:
>
> > You can do this in PowerPoint by incorporating some VBA. I have a
> > calculation example at:
> >
> > http://www.pttinc.com/ppt_faq8.html
> >
> > --
> > Bill Foley, Microsoft MVP (PowerPoint)
> > Microsoft Office Specialist Master Instructor - XP
> > www.pttinc.com
> > Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
> > Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm
> >
> > "Garrydene" <(E-Mail Removed)> wrote in message
> > news
65117B1-631E-4231-8DCB-(E-Mail Removed)...
> > > I want to copy from excel a small group of cells that have numbers and
> > > calculations and then I want to paste then into Powerpoint and when I
am
> > > presenting my powerpoint slide show I want to be able to change a
number
> > and
> > > have the values change because the calculation uses the number I typed
in.
> >
> >
> >