Error when using IDE commands

  • Thread starter Thread starter Peter Ostermann
  • Start date Start date
P

Peter Ostermann

Hi folks,

using Excel 2000 allows to use the following code
(which is quite helpful during developement)
when opening and closing the workbook.

Sub OpenMainWindow()
With Application.VBE.MainWindow
.Visible = True
.SetFocus
End With
End Sub

Sub CloseMainWindow()
Application.VBE.MainWindow.Visible = False
End Sub

Running the same application using Excel 2003 this
code creates errors.

Are there any infos or known workarounds
concerning this problem?

Regards
Peter Ostermann
 
Peter,

In Excel (not in the VBE) choose Tools - Macro - Security - Trusted
Publishers, check "Trust Access to Visual Basic Project".

hth,

Doug
 

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

Back
Top