VB code to advance slide and loop

V

Vick Dhanapal

Hi All,

I was wondering if there is a way to advance from one slide to another
as a slide show and loop the process infinitely.

I have a ppt with 3 slides. Each slide has a linked excel sheet. I am
using a code that checks if the linked file is open or else updates the
linked file automatically.

The issue I am is, if I use SlideShowSettings.Run, it runs the vb code
and updates the links just the first time and stops checking it during
the second run. Attached below is the code, any help would be really
appreciated.

Thanks, Vick

Sub Macro1()
ActivePresentation.SlideShowSettings.Run
Dim strFN As String
strFN = "File Name"
If Not FL(strFN) Then
ActivePresentation.UpdateLinks
End If
End Sub
___________________________________________________________

Function FL(strFN As String) As Boolean
On Error Resume Next
Open strFN For Binary Access Read Write Lock Read Write As #1
Close #1
If Err.Number <> 0 Then
FL = True
Err.Clear
End If
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top