ScreenUpdating should do it. I'm not sure why it wouldn't. You could try the
following:
Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As
Long) As Long
Sub OpenWorkbook()
Dim XLHWnd As Long
On Error GoTo ErrH:
XLHWnd = Application.Hwnd
LockWindowUpdate XLHWnd
Workbooks.Open "C:\Book1.xls"
ErrH:
''''''''''''''''''''''''''''
' Be SURE (!!) that
' LockWindowUpdate 0& gets
' called regardless of any
' error.
''''''''''''''''''''''''''''
LockWindowUpdate 0&
End Sub
Be SURE (!) to call LockWindowUpdate passing it a 0, regardless of whatever
path code execution takes or whatever errors may occur.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
"dim" wrote in message
...
Hi folks,
When I run a macro I've disabled some screen flicker using
ScreenUpdating=False which works fine. But part of my macro is to open
then
close another workbook, and when it opens it automatically displays for a
second until it closes again. Is there any way I can stop this?
Maybe there's some sort of option in Excel that doesn't open new workbooks
as the front window and I could include the selection of this option as
part
of my macro.....
Any ideas are much appreciated?
Thanks