Last updated: 18 Jun 2003
(Based on a post by David Legge)
Easy! Just use the command:
currentwindow.redraw = False
... and will stop the window from redrawing automatically.
The trick is that you REALLY REALLY need to make sure it gets unfrozen again!
To do this set currentwindow.redraw = True at a point where the code is guaranteed to execute otherwise the window will be frozen forever.
Best to place it in an error trap, so that if anything goes wrong it will
unfreeze the screen:
Sub Mysub(......)etc
'Error trap
On Error Goto Trap
currentwindow.redraw = False
' YOUR CODE
ExitSub:
currentwindow.redraw = True
Exit Sub
Trap:
Msgbox "Error " & Format$(Err, "####") & " in Mysub" _
& Chr(10) & Error$, 16, "Trapped Error"
Resume ExitSub
End Sub