graemeal
Active Member
- Joined
- May 17, 2007
- Messages
- 316
- Platform
- Windows
Now this being a powerpoint question it is most likely the wrong forum to ask this question in but I thought maybe someone has a solution!
I am trying to get a Powerpoint presentation to open at a specific time each day.
I have the below code for an excel spreadsheet but of course Powerpoint does not have a workbook to enter the code in?
Thanks
XP PPT 2007
In Module
In ThisWorkBook
I am trying to get a Powerpoint presentation to open at a specific time each day.
I have the below code for an excel spreadsheet but of course Powerpoint does not have a workbook to enter the code in?
Thanks
XP PPT 2007
In Module
Code:
Public dTime As Date
Sub MyMacro()
Windows("TIME.xlsm").Activate
Sheets("Sheet1").Select
dTime = Now + 1
Application.OnTime dTime, "MyMacro"
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub
In ThisWorkBook
Code:
Private Sub Workbook_Open()
Application.OnTime TimeValue("15:25:00"), "MyMacro"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If CLng(dTime) <> 0 Then
Application.OnTime dTime, "MyMacro", , False
End If
End Sub