ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I hide VBE window appearing when running VB6 app (https://www.excelbanter.com/excel-programming/356938-how-can-i-hide-vbe-window-appearing-when-running-vb6-app.html)

vivek7

How can I hide VBE window appearing when running VB6 app
 

Hi,

I am using the following code...

With oWB.VBProject.VBComponents("ThisWorkbook").CodeMod ule
StartLine = .CreateEventProc("Open", "Workbook") + 1
InsertLines StartLine, "MsgBox ""Hello World"",vbokonly"


End With
when I run it, the VBE window shows up and then disappears.
I would like to hide the VBE window from popping up.

I have tried following without any success


oExcel.EnableEvents = False
oExcel.Application.Visible = False
oExcel.Application.ScreenUpdating = False
oExcel.VBE.MainWindow.Visible = False
oExcel.Application.WindowState = xlMinimized

I hope I have made myself clear.

V


--
vivek7
------------------------------------------------------------------------
vivek7's Profile: http://www.excelforum.com/member.php...o&userid=32746
View this thread: http://www.excelforum.com/showthread...hreadid=525782



All times are GMT +1. The time now is 08:54 AM.

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