Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2014, 06:07 PM
theculpeppers theculpeppers is offline VB Project in PowerPoint 2007/10 (Game Concept Question) Windows 7 32bit VB Project in PowerPoint 2007/10 (Game Concept Question) Office 2007
Novice
VB Project in PowerPoint 2007/10 (Game Concept Question)
 
Join Date: Nov 2014
Posts: 2
theculpeppers is on a distinguished road
Default VB Project in PowerPoint 2007/10 (Game Concept Question)

Quick question....I am a teacher and have created a game in powerpoint 2007 using a little VB. I am not a programmer, but I am trying to find a way to take the Value I have in a textbox (Textbox2) - which is written to add the value of two textboxes together, for example - me.textbox1 - val(textbox1) + val(textbox2).

I simply want to be able to carry the value from one slide to another while continuing to add values using the same formula.

Game is on slide 1 using the formula above and I want to be able to copy/paste the design on slide 2 while being able to carry the total of the value in textbox2 onto slide 2, then on to slide 3, etc.....

Finally having a grand total, for example on slide 5.

I just don't know how to carry the value(s) from one slide to another....any and all help would be greatly appreciated!!!
Reply With Quote
  #2  
Old 11-05-2014, 09:51 PM
excelledsoftware excelledsoftware is offline VB Project in PowerPoint 2007/10 (Game Concept Question) Windows 7 64bit VB Project in PowerPoint 2007/10 (Game Concept Question) Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

Sounds like we would need a sample presentation to to really see what is going on but what I have done for something like this is choose 1 slide for data usually the last slide. Make this slide hidden from the rest of the show and then keep referencing back to the data that I need. For example If I was looking for a way to keep a running total I would have a shape on the data slide called total. I would then set the reference using.
Code:
Dim TotalValueShape as Shape, LastSlide as Integer, TotalScore as integer
LastSlide = activepresentation.slides.count
Set TotalValueShape = activepresentation.slides(LastSlide).shapes("Total")
TotalScore = TotalValueShape.textframe.textrange.characters
Now with this reference you can set the TotalValueShape.TextFrame.TextRange.Characters to whatever value you get from your calcualtion and then keep referencing back to it.

Sorry if this is confusing there may be a better way but its the way that worked for me.
Reply With Quote
  #3  
Old 11-06-2014, 01:55 AM
JohnWilson JohnWilson is offline VB Project in PowerPoint 2007/10 (Game Concept Question) Windows 7 64bit VB Project in PowerPoint 2007/10 (Game Concept Question) 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

You just need to have a public variable in a normal module to store the value to carry over.

Have a look at the codes in the attached.
Attached Files
File Type: pptm add.pptm (58.1 KB, 14 views)
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #4  
Old 11-06-2014, 08:23 PM
theculpeppers theculpeppers is offline VB Project in PowerPoint 2007/10 (Game Concept Question) Windows 7 32bit VB Project in PowerPoint 2007/10 (Game Concept Question) Office 2007
Novice
VB Project in PowerPoint 2007/10 (Game Concept Question)
 
Join Date: Nov 2014
Posts: 2
theculpeppers is on a distinguished road
Default VB Project in PowerPoint 2007/2010

Thank you for your reply. Attached is my sample. It is based on the Family Feud game. I have the file attached. It is zipped b/c it exceeded the 500kb limit. It is only 633kb total - not zipped.

Any and all help is greatly appreciated.
Attached Files
File Type: zip VB MACRO - Class Feud FINAL.pptm.zip (618.5 KB, 7 views)
Reply With Quote
  #5  
Old 11-07-2014, 06:08 AM
JohnWilson JohnWilson is offline VB Project in PowerPoint 2007/10 (Game Concept Question) Windows 7 64bit VB Project in PowerPoint 2007/10 (Game Concept Question) 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

See if this helps you get further. (There is still work to do!)

I have included methods to reset the score when the show ends and automatically show the total scores.
Attached Files
File Type: zip VB MACRO - Class Feud FINAL.zip (636.9 KB, 11 views)
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply

Tags
powerpoint 2007/10, powerpoint game, powerpoint player

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help...Powerpoint Game Not Working In One Column asher PowerPoint 0 08-20-2014 12:57 PM
VB Project in PowerPoint 2007/10 (Game Concept Question) MS Project 2010 - 'Who Does What When' report question jrdunn78hawk Project 5 06-24-2014 07:00 AM
Question about tasks on critical path in MS Project schedule (with a twist) SomewhereinTX Project 7 01-06-2014 03:07 PM
Memory Game with PowerPoint mikeinitaly PowerPoint 0 07-29-2012 09:46 PM
VB Project in PowerPoint 2007/10 (Game Concept Question) New to project - Predecessor Question geissap Project 1 01-20-2011 10:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:18 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