P
Paul W Smith
I have seen code in the past which uses an windows API to lock the screen
I found the code below which apparently does this.
However it does not work or more accurately the LockWindowUpdate
ThisApplication.MainFrameHWND line gives a "Object does not support this
property or method" error.
How do I correct this?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paste the following declaration at the top of your module:
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As
Long) As Long
And then use these lines of code in your macro to lock and unlock screen
updates:
' Locks window updates
LockWindowUpdate ThisApplication.MainFrameHWND
' Unlocks window updates
LockWindowUpdate 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I found the code below which apparently does this.
However it does not work or more accurately the LockWindowUpdate
ThisApplication.MainFrameHWND line gives a "Object does not support this
property or method" error.
How do I correct this?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paste the following declaration at the top of your module:
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As
Long) As Long
And then use these lines of code in your macro to lock and unlock screen
updates:
' Locks window updates
LockWindowUpdate ThisApplication.MainFrameHWND
' Unlocks window updates
LockWindowUpdate 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~