Open and hide a document by toggling

S

susan

I use an Index file all the time. It is loaded but hidden whenever Excel is
on. When I click a button it comes on but I have to physically hide it when
it is not wanted. How can the codes be changed so that the same button
caries out both the tasks by toggling?
Thank you if you can help.

Susan
 
B

Barb Reinhardt

Try something like this:

If Not Windows("Book1").Visible Then
Windows("Book1").Visible = True
Else
Windows("Book1").Visible = False
End If

HTH,
Barb Reinhardt
 
S

susan

Marvellous, it works. Thanks Barb.

Barb Reinhardt said:
Try something like this:

If Not Windows("Book1").Visible Then
Windows("Book1").Visible = True
Else
Windows("Book1").Visible = False
End If

HTH,
Barb Reinhardt
 
Top