Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2010, 08:31 PM
piper7971 piper7971 is offline simple code doesn't work help Windows Vista simple code doesn't work help Office 2007
Advanced Beginner
simple code doesn't work help
 
Join Date: Jul 2010
Posts: 38
piper7971 is on a distinguished road
Default simple code doesn't work help

hi, i am making a game in ppt using a simple script but for some reason is not working as it should.
1st problem: when i go to the show the first code doesnt work unless i stop the show and start again then it works perfectly. the second code works fine,
2nd problem: when i go to the slide with the 3rd code the shape bo50 do not appear until i stop the show. in that slide i have 2 picture, bo50 and bc50 and a textbox. since this is a game, when the textbox is clicked, bc50 dissappear and it's supposed that bo50 appear but it doesn't during the show. when i stop the show the picture is there. i used a code to name the shape but the name is not the problem and the debugger doesnt show any errors. when i erase one of the lines from the 2nd code they work so it's like they can work together. PLEASE HELP ME THIS IS DRIVING ME CRAZY!!!!! WHAT COULD BE WRONG?

1st CODE
Sub Start()

ActivePresentation.Slides(2).Shapes("bc1").Visible = True
ActivePresentation.Slides(2).Shapes("m50").Visible = True
ActivePresentation.Slides(8).Shapes("bo50").Visibl e = False
ActivePresentation.Slides(8).Shapes("bc50").Visibl e = True
ActivePresentation.SlideShowWindow.View.GotoSlide (2)
End Sub

2nd code
Sub BC1()
ActivePresentation.SlideShowWindow.View.GotoSlide (8)
ActivePresentation.Slides(2).Shapes("bc1").Visible = False
ActivePresentation.Slides(2).Shapes("m50").Visible = False
End Sub

3rd code
Sub atbco50()
ActivePresentation.Slides(8).Shapes("bo50").Visibl e = True
ActivePresentation.Slides(8).Shapes("bc50").Visibl e = False

End Sub
Reply With Quote
  #2  
Old 08-13-2010, 03:02 PM
Jercook Jercook is offline simple code doesn't work help Windows XP simple code doesn't work help Office 2010 (Version 14.0)
Novice
 
Join Date: Aug 2010
Location: West Valley Utah
Posts: 13
Jercook is on a distinguished road
Default

Don't have enough info to actually try it but add
'DoEvents' just before each end sub and see if that helps.
Reply With Quote
  #3  
Old 08-19-2010, 08:15 AM
Jercook Jercook is offline simple code doesn't work help Windows XP simple code doesn't work help Office 2010 (Version 14.0)
Novice
 
Join Date: Aug 2010
Location: West Valley Utah
Posts: 13
Jercook is on a distinguished road
Default spelling mistake

Hi,

Like in another of your posts with a bunch of if statements, some of your spellings of "Visible" as "Visibl e" are a problem. The mispelling are probably stopping your code from working.

VBA is very fussy about spelling errors and it isn't very good about telling you where the problems are.
Reply With Quote
Reply

Tags
vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple template kieransymes Word 0 03-08-2010 02:13 AM
Simple formulas den hobbelder Word 1 02-26-2010 01:53 PM
Simple Envelope Question.... cmcneill Word 0 08-17-2009 05:12 PM
Why wont my simple formulae work? Florish Excel 4 02-17-2009 07:33 AM
Simple macro undoable? garon5 Outlook 0 04-20-2007 10:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:43 PM.


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