How can I hide VBE window appearing when running VB6 app

V

vivek7

Hi,

I am using the following code...

With oWB.VBProject.VBComponents("ThisWorkbook").CodeModule
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
 

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

Top