Powerpoint macro screenupdating

Declare Function Find Window Lib "user32" Alias "Find Window A" _ (By Val lp Class Name As String, _ By Val lp Window Name As Long) As Long ' Use Lock Window Update to prevent/enable window refresh Declare Function Lock Window Update Lib "user32" _ (By Val hwnd Lock As Long) As Long ' Use Update Window to force a refresh of the Power Point window Declare Function Update Window Lib "user32" (By Val hwnd As Long) As Long Property Let Screen Updating(State As Boolean) Static hwnd As Long Dim Version No As String ' Get Version Number If State = False Then Version No = Left(Application. Version, ".") - 1) ' Get handle to the main application window using Class Name Select Case Version No Case "8" ' For PPT97: hwnd = Find Window("PP97Frame Class", 0&) Case "9" ' For PPT2K: hwnd = Find Window("PP9Frame Class", 0&) Case "10" ' For XP: hwnd = Find Window("PP10Frame Class", 0&) Case "11" ' For 2003: hwnd = Find Window("PP11Frame Class", 0&) Case "12" ' For 2007: hwnd = Find Window("PP12Frame Class", 0&) Case "14" ' For 2010: hwnd = Find Window("PPTFrame Class", 0&) Case "15" ' For 2013: hwnd = Find Window("PPTFrame Class", 0&) Case Else Err.

I was able to solve the issue to my liking by using a workaround this 'which window is on top' problem. Shape Dim Slide Number As String On Error Resume Next Set ppt App = New Power Point. Range Dim Slide Title As String Dim Slide Text As String Dim Slide Object As Object Dim ppt Textbox As Power Point. Slide Size = pp Slide Size On Screen mean "attach to a running Power Point instance if it exists, otherwise create a new one". Also as mentioned in the comments, if you have a reference to Microsoft Power Point X. The screen unfreezes apparently when VBA code copies a preformatted worksheet from the macro workbook into a new workbook, although other circumstances must trigger it as well.

Leave a Reply

  1. dating someone 20 years younger 14-Oct-2020 10:13

    Flingster is an adult video chat site that randomly connects people to strangers.