To "freeze" Spreadsheet

  • Thread starter Thread starter Daniel Utsch
  • Start date Start date
D

Daniel Utsch

Does anybody know as "freezing", the spreadsheet, in the moment of the
execution of a macro? I already tried :

Application.ScreenUpdating = False
Application.EnableAnimations = False

but the commandButtons of the Spreadsheet don't freeze when to macro this in
processing.

Thanks
Daniel Utsch
 
You can use the LockWindowUpdate Windows API function. E.g.,

Public Declare Function LockWindowUpdate Lib "user32" _
(ByVal HWnd As Long) As Long

Sub AAA()
LockWindowUpdate Application.HWnd
' your code here
LockWindowUpdate 0&
End Sub

Just be *SURE* that you have error trapping logic in place that
ensures that the window will be unlocked with

LockWindowUpdate 0&

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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

Similar Threads

PowerPoint Freeze animation 1
including macro in protected worksheet 2
Create a macro to re-create a format? 1
VBA Formula Help 5
excel freezing 2
Excel Date Setting 1
freeze panes from vba 2
Getvalues Macro Help Needed 2

Back
Top