Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

Powerpoint check data from excel VBA

$
0
0

I currently have a powerpoint that is has data links to an excel file,

I am attempting to create an endless powerpoint loop that every slide change runs a macro, this macro needs to connect to the excel file, look at cell B2 and if B2 > 0 it needs to output an action that causes an animation to flash up on the screen,

I have attempted to make the powerpoint open the excel file but I have not been able to get further than this, please help.

Private Sub OnSlideShowPageChange()
    Dim i As Integer
    Dim xlApp As Excel.Application
    Dim xlWorkBook As Object
    Dim Test As Object


    'i = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
    'If i <> i Then Exit Sub

    Test = 0
    Set xlApp = New Excel.Application
    Set xlWorkBook = xlApp.Workbooks.Open("C:\Users\Michael\Documents\Wallboard Test Data.xlsx", True, False)
    Set Test = xlWorkBook.sheets("Hall of Fame").Select.Range("B2").Value

    MsgBox Test

End Sub

Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>