Excel can't control this. But you can use an API.
Saved from a previous post:
There are API calls that can freeze your screen so nothing moves. But if
something goes wrong, it's reboot time. I wouldn't use them. I'd live with
minor flashing.
At the top of the module:
Declare Function LockWindowUpdate Lib _
"user32" (ByVal hwndLock As Long) As Long
Declare Function FindWindowA Lib _
"user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
In your code:
Sub whatever()
'do stuff
'freeze the screen
hWnd = FindWindowA("XLMAIN", Application.Caption)
LockWindowUpdate hWnd
'do more stuff
'unfreeze the screen
LockWindowUpdate 0
'do more stuff
End sub
Remember to save your work often (in all open applications!) if you use this.
You may be rebooting more than you want. (I wouldn't use this--but I've said
this before.)
how to close Printer status bar wrote:
>
> HI,
> I Open a Excel File with 'Excel.Application', then print Active WorkBooks.
> this ExcelApplication show a dialog Mesage with 'pRING THE FIRST PAGE TOTAL
> PAGES 2 ..........' .THIS IS A USEFULL MESSAGE,BUT In my programe. i don't
> need.
> please help me how to close this message.
--
Dave Peterson
|