Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Keep VBA window hidden
Hi guys.
I'm trying to add an event procedure to my VBA code and I am unable to supress the VBA window from opening when the macro runs. I have tried turning off screen updating and making sure that the VBA window is closed but it still opens when it runs. Any help would be appreciated. Thanks James Application.ScreenUpdating = False Application.VBE.MainWindow.Visible = False With ActiveWorkbook.VBProject.VBComponents("Sheet7").Co deModule StartLine = .CreateEventProc("BeforeDoubleClick", "Worksheet") + 1 .InsertLines StartLine, "PurchasePartsDblClick" End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Keep VBA window hidden
JGeniti wrote:
Hi guys. I'm trying to add an event procedure to my VBA code and I am unable to supress the VBA window from opening when the macro runs. I have tried turning off screen updating and making sure that the VBA window is closed but it still opens when it runs. Any help would be appreciated. Thanks James Application.ScreenUpdating = False Application.VBE.MainWindow.Visible = False With ActiveWorkbook.VBProject.VBComponents("Sheet7").Co deModule StartLine = .CreateEventProc("BeforeDoubleClick", "Worksheet") + 1 .InsertLines StartLine, "PurchasePartsDblClick" End With Sceen updating works only on Excel windows. You can't hide VBE windows, but you can freeze it. Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long ActiveWorkbook.VBProject.VBE.MainWindow.SetFocus LockWindowUpdate Application.VBE.MainWindow.Hwnd your code Application.VBE.MainWindow.Visible = False LockWindowUpdate 0& |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
View cell contents as a pop-up window (similar to comments window) | Excel Worksheet Functions | |||
Template opens in hidden window? | Excel Discussion (Misc queries) | |||
The window opens in a smaller window not full sized window. | Excel Discussion (Misc queries) | |||
make hidden window or workbook visible without specify the name | Excel Worksheet Functions | |||
unhide hidden window or workbook | Excel Worksheet Functions |