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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top