Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-12-2011, 07:46 AM
mollovg mollovg is offline Powerpoint VBA Help Please Anyone!!!! Windows Vista Powerpoint VBA Help Please Anyone!!!! Office 2007
Novice
Powerpoint VBA Help Please Anyone!!!!
 
Join Date: Sep 2011
Posts: 2
mollovg is on a distinguished road
Default Powerpoint VBA Help Please Anyone!!!!

Hello Everyone,

I am in need of urgent help, I just do not know how to do this if anyone can help I would be extremely gratefull.
I am making a powerpoint presentation whereby the user can change scrolling promotion text by opening an Inputbox and entering the text they want and that would apply to all slides, thats done now thanks to the kind help from this forum. I was wondering if it is possible to allow the user to enter a date when they would like the promotion text to start scrolling and then a date when for the promotion text to stop, for example after that date the textbox where the promotion text is would clear when the date passes? also iif the date is not today for example the text would start scrolling when the date is the date the user wants the text to start scrolling? This is what I have done in terms of code so far but it doesnt seem to work, any help would be greatly appreciated.

Dim v As String
Dim expiry As Date
Dim dNow As Date
Dim promo As String
Dim i As Integer
Dim e As Integer
expiry = InputBox("Please enter the date for the promotion to expire")
promo = InputBox("Please enter the promotion text you would like to display")
dNow = now
e = DateDiff("d", dNow, expiry)
i = 1
If dNow < expiry Then
MsgBox "The promotion will expire on" & vbCrLf & expiry
For i = 1 To ActivePresentation.Slides.Count
ActivePresentation.Slides(i).Shapes("Rectangle 11").TextFrame.TextRange = promo
Next i
Else
If e = 0 Then
For i = 1 To ActivePresentation.Slides.Count
ActivePresentation.Slides(i).Shapes("Rectangle 11").TextFrame.TextRange = ""
Next i
Else
If expiry < dNow Then


MsgBox "The Date you set is before today. Please set a Date after" & vbCrLf & dNow
End If
End If
End If

Any help would be great because it isnt working and I cant figure out why

Thanks
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
PowerPoint 2007 --> PowerPoint 2003 Webpage? josephsh PowerPoint 0 06-09-2011 11:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:00 PM.


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