ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error when using IDE commands (https://www.excelbanter.com/excel-programming/377277-error-when-using-ide-commands.html)

Peter Ostermann[_3_]

Error when using IDE commands
 
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

Doug Glancy

Error when using IDE commands
 
Peter,

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

hth,

Doug


"Peter Ostermann" wrote in message
...
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





All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com