Hide Workbook
The workbook that contains the userform?
dim myWindow as window
for each mywindow in thisworkbook.windows
mywindow.visible = false
next mywindow
Change
thisworkbook.windows
to
activeworkbook.windows
if you want the activeworkbook's windows hidden.
===
If there's only one window for that workbook:
thisworkbook.windows(1).visible = false
aftamath77 wrote:
I would like to write code that will hide a specific workbook when a userform
pops up. I tried:
Application.Visible = False
That works fine except, it hides Excel completely. I would like to hide
only the workbook that contains the userform.
--
Dave Peterson
|