joeyp
09-05-2012, 06:28 AM
Hi all,
What i am trying to do is create a spreadsheet that after 1 minute of inactivity goes to a sheet that is linked to a powerpoint, this powerpoint pops up and in the background the excel sheet goes to the main menu.
then after another minute of inactivity it does the same, a sort of screensaver effect with a powerpoint presentation.
So what I have so far is,
ThisWorkbook
Private Changed As Boolean
Private Sub Workbook_Activate()
Changed = False
Application.OnTime Now + TimeValue("00:00:05"), procedure:="SelectIndex"
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Source As Range)
Changed = True
End Sub
Which works to an extent, i want it to stop counting down if somebody is active, such as swithing sheets but it doesnt, it just counts to 5 and opens up the presentation even if im flickin through sheets.
It also only does it once and then stops after. Which I want it to do it again after inactivity :)
In SelectIndex I have
Sub SelectIndex()
Sheets("Sheet1").Select
End Sub
sheet 1 is the sheet that pops up the powerpoint and this sheet has some code which is:
Private Sub Worksheet_Activate()
ActiveSheet.Shapes("Object 1").Select
Selection.Verb
Sheets("Sheet2").Select
End Sub
Object 1 is the powerpoint and sheet2 is the main menu
Please help :)
What i am trying to do is create a spreadsheet that after 1 minute of inactivity goes to a sheet that is linked to a powerpoint, this powerpoint pops up and in the background the excel sheet goes to the main menu.
then after another minute of inactivity it does the same, a sort of screensaver effect with a powerpoint presentation.
So what I have so far is,
ThisWorkbook
Private Changed As Boolean
Private Sub Workbook_Activate()
Changed = False
Application.OnTime Now + TimeValue("00:00:05"), procedure:="SelectIndex"
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Source As Range)
Changed = True
End Sub
Which works to an extent, i want it to stop counting down if somebody is active, such as swithing sheets but it doesnt, it just counts to 5 and opens up the presentation even if im flickin through sheets.
It also only does it once and then stops after. Which I want it to do it again after inactivity :)
In SelectIndex I have
Sub SelectIndex()
Sheets("Sheet1").Select
End Sub
sheet 1 is the sheet that pops up the powerpoint and this sheet has some code which is:
Private Sub Worksheet_Activate()
ActiveSheet.Shapes("Object 1").Select
Selection.Verb
Sheets("Sheet2").Select
End Sub
Object 1 is the powerpoint and sheet2 is the main menu
Please help :)