Thread: Syntax-Change?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RichardSchollar RichardSchollar is offline
external usenet poster
 
Posts: 196
Default Syntax-Change?

Hi Peter

Does it actually error out on a particular line in the sub you
posted? I ask because it causes no errors on my machine (xl2003 and
XP SP2). How are you calling that sub on opening of the workbook? Is
it a line in the WorkBook_Open event such as:

Private Sub Workbook_Open()
OpenMainWindow
End Sub

Best regards

Richard

On 27 Jan, 11:18, "Peter Ostermann"
wrote:
Hi folks,
migrating from Excel 2000 to 2003, I realize that
the VBA-code may have changed in some parts.

The routine below, called when workbook
opens - quite helpful at times when a bit of
programming is done - in 2003 produces
an error:

Sub OpenMainWindow()
' On Error Resume Next
With Application.VBE.MainWindow
.Visible = True
.SetFocus
End With
End Sub

Is there any known workaround available?
Thanks in advance for any hint.

Best Regards
Peter Ostermann