Thread: Hide Workbook
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
IanC[_2_] IanC[_2_] is offline
external usenet poster
 
Posts: 157
Default Hide Workbook

Worksheets("Sheet1").Visible = False

Bear in mind that Excel must have at least one worksheet visible.

Another alternative might be to reduce the window size so it is hidden
behind the userform.

Assuming the code is in the active worksheet:

With ActiveWindow
.WindowState = xlNormal
.Top = 100
.Left = 250
.Height = 100
.Width = 100
End With
UserForm1.Show

--
Ian
--

"aftamath77" wrote in message
...
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.