Re: Can I get formula's to work in Powerpoint (excel cut and paste

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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" <Eduardo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F757A55C-F104-478C-A975-1554607A296C@xxxxxxxxxxxxxxxx
> 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" <Garrydene@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:D65117B1-631E-4231-8DCB-7A81A5F33C2B@xxxxxxxxxxxxxxxx
> > > 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.
> >
> >
> >


.



Relevant Pages

  • cursor in textbox control
    ... I'm pretty comfortable using PowerPoint to create ... her student to copy and what those words are. ... zone) and she copies it in a textbox control just under it. ... Is it possible to do it using VBA? ...
    (microsoft.public.powerpoint)
  • Textfield Name
    ... Is there a possibility to change the name of a textbox in PowerPoint? ... Because I'm reffering to the textbox by vba, it now has a name like ...
    (microsoft.public.powerpoint)
  • Re: text box
    ... "dee" wrote in message ... >VBA or any of the other stuff I don't understand. ... I think it is a textbox ... >and I just copied and pasted the textbox to a blank PowerPoint and it still ...
    (microsoft.public.powerpoint)
  • Re: Can one presentation be embedded within another?
    ... C2887636.1C2C5%goldkey74@xxxxxxxxxxxxxxxxxxxxxx, "Jim Gordon MVP" ... Applescript vs VBA ... Once you learn AppleScript you'll be able to script lots ... Applescript manipulates the Excel and PowerPoint ...
    (microsoft.public.mac.office.powerpoint)
  • Re: Getting started with some automation
    ... that offers a directory service to a database of song lyrics. ... that the PowerPoint slide and textbox objects would be fairly ... I would revisit the idea of learning the use of VBA in PowerPoint ...
    (microsoft.public.powerpoint)