View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
vivek7 vivek7 is offline
external usenet poster
 
Posts: 1
Default 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