If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > Powerpoint VBA Help Please Anyone!!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-12-11, 10:39
mollovg mollovg is offline
Registered User
 
Join Date: Sep 2011
Posts: 1
Powerpoint VBA Help Please Anyone!!!!

Hello,

I realise that this may not be the proper channel to post this but I have tried everything else and all other forums but they just dont answer and I do not how to do this particular thing in Powerpoint. Please if anyone can help it would be really great.
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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On