Consulting

Results 1 to 2 of 2

Thread: updating powerpoint

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    updating powerpoint

    Hello all,

    I've run in to a problem with i presentation.


    The Set-up:

    Excel file one: A data workbook, feeding the powerpoint.

    Powerpoint one: A powerpoint, running in kiosk mode. An application, which updates all links in the powerpoint when the 1st slide is opened again, is running in it.

    Excel two: A part of the data in excel one is generated by an excel workbook, this uses a macro to send an update every set time(5 min. now)


    The issue:

    Excel two checks before opening if excel one is read only, if so it does nothing. But powerpoint doesnt, so if it tries to update while excel two is updating it get's stuck.
    A solution suggested by another (powerpoint) site, was to make Excel one shared. This made sense, but somehow Excel 2 still locked the file. How can this be
    Set wbdata = Workbooks("data grafiek.xlsx")
    If wbdata Is Nothing Then Set wbdata = Workbooks.Open("I:\OEE\testbestand\presentatie\data grafiek.xlsx")
    If Workbooks("data grafiek.xlsx").ReadOnly = False Then
    For Each Sh In wbdata.Sheets
        If Sh.Name = "Lab samples" Then
        With Sh.Range("B6:E48")
        .ClearContents
        End With
        End If
        Next Sh
    For Each Sh In Wb.Sheets
        If Sh.Name = "Lab samples" Then
            With Sh.Range("B6:E48" & Sh.Cells(Rows.Count, 2).End(xlUp).Row)
                .Copy Workbooks("data grafiek.xlsx").Sheets(Sh.Name).Cells(Rows.Count, 2).End(xlUp).Offset(1)
            End With
        End If
    Next Sh
    wbdata.Close True
    End If
    wbdata.Close True
    Another option would be having a macro for updating the powerpoint, which also checks first if the file is read only. This gives me a lot of issues, simply i can't get it to work.
    Sub update()
    Dim xlApp As Object
    Dim xlWorkBook As Object
    Set xlApp = CreateObject("Excel.Application")
    xlApp.Visible = True
    If xlApp.workbooks.Open("I:\OEE\testbestand\presentatie\test.xlsx").ReadOnly = True Then
    MsgBox ("Read Only")
    Else
    MsgBox ("niet Read Only")
    End If
    xlApp.workbooks.Close
    xlApp.Visible = False
    End Sub
    This part goes as expected, but after altering the msgbox to an update command like:
    Application.Presentations.UpdateLinks or ActiveAplication.UpdateLinks
    it doesn't run.
    In the attachments is a test version, the extension of the update links test has to be changed back to pptm.
    Can this be fixed?
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •