Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2012, 08:10 AM
Nate Nate is offline Division by Zero error Windows 7 64bit Division by Zero error Office 2010 64bit
Novice
Division by Zero error
 
Join Date: Nov 2012
Posts: 1
Nate is on a distinguished road
Default Division by Zero error

I'm running a five-slide presentation with ActiveX control buttons and text boxes.

I have a Command button on slide five that carries a value forward from TextBox3 in slide 2 to TextBox1 in Slide 5.



The operating code in Slide Five CommandButton1 is:

Me.TextBox1.Text = Slide2.TextBox3.Text
TextBox1.Text = Format(TextBox1.Text, "000.0")
TextBox2 = 2000 / TextBox1
TextBox2.Text = Format(TextBox2.Text, "0.000")

The problem is, in Slide 5, TextBox1, the value in that box is '0' until I operate the Command button - so I get a 'divide by zero' error until I put a value in Slide2.TextBox3.

Wondering if there's an if/then line I can put into CommandButton1 on slide 5 to default the value in TextBox2 on slide 5 to '0', to overcome that error?

Or would it be possible to write code in Slide2 that would carry the value of TextBox3 in Slide2 to TextBox1 in Slide5?

I have a CommandButton in Slide2 that calculates the value of Slide2.TextBox3, so maybe I can add a line that sends this value to Slide5.TextBox1?
Reply With Quote
  #2  
Old 11-29-2012, 10:51 PM
JohnWilson JohnWilson is offline Division by Zero error Windows 7 64bit Division by Zero error Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Are you sure the Slide container on Slide 2 IS called Slide2. That may sound a strange question but it probably isn't.

have a read here ("Use Text from a Control TextBox")
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Division by Zero error No paragraphs division hbrt Word 1 01-24-2012 05:01 PM
Division by Zero error Microsoft office 2010 error 2908 and error 1935 !!!!!!heeeeellpppp!!!!!!!!! bennypryde Office 1 01-05-2012 03:33 PM
calculating points and division in excel edward masoya Excel 1 05-09-2011 06:31 AM
Runtime error 5487 - Word cannot complete the save to to file permission error franferns Word 0 11-25-2009 05:35 AM
Division by Zero error division zero escape? gmyls Excel 2 05-22-2009 02:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft