Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2011, 09:22 AM
mollovg mollovg is offline Auto_Open and Code tied to a slide Windows Vista Auto_Open and Code tied to a slide Office 2007
Novice
Auto_Open and Code tied to a slide
 
Join Date: Sep 2011
Posts: 2
mollovg is on a distinguished road
Default Auto_Open and Code tied to a slide

Hello Again,

I have the following question: Is it possible for a code in a module with Auto_Open to communicate in some way with code written in a specific slide in Powerpoint, anotherword for a variable to get passed from the code in the slide to the autorun in the module. this is my code:

Sub Auto_Open()
Dim oDate As Date
Dim UDate As Date
Dim promo As String
Dim i As Integer
oDate = Now()
MsgBox "You just opened the presentation." & vbCrLf & "Today's Date is:" & oDate
If MsgBox("Would you like to add a promotion message today", vbOKCancel) = vbOK Then
i = 1
promo = InputBox("Enter promotion text", "Enter Promotion Text")
For i = 1 To ActivePresentation.Slides.count
ActivePresentation.Slides(i).Shapes("Rectangle 2").TextFrame.TextRange = promo
Next i
Else
Exit Sub
End If
End Sub

Also for some reason I cannot execute the promo to be added to every slide it works if it is in the normal slide code view but it doesnt do it in the Auto_Open, is that not ossible as a whole?

Thanks,



george
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto_Open and Code tied to a slide slide image wont copy with text to new slide lewis.mulhollen PowerPoint 1 12-17-2011 03:17 AM
Maintaining a shrunken object from slide to slide Straitsfan PowerPoint 0 05-18-2011 01:04 PM
Auto_Open and Code tied to a slide PPT animation. New slide where old slide ended Neiljackson28 PowerPoint 1 03-08-2011 12:47 PM
What slide attribute can I use in VBA to detect hidden slide? mikel401 PowerPoint 1 02-22-2011 11:13 AM
PP 2010 .avi file plays during slide show, but causes the slide show to loop to begin VictorS PowerPoint 0 10-16-2010 10:23 AM

Other Forums: Access Forums

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