Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Open and hide a document by toggling

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


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Open and hide a document by toggling

Try something like this:

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

HTH,
Barb Reinhardt

"susan" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Open and hide a document by toggling

Marvellous, it works. Thanks Barb.

"Barb Reinhardt" wrote in message
...
Try something like this:

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

HTH,
Barb Reinhardt

"susan" wrote:

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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
toggling jlofritts Excel Worksheet Functions 3 March 7th 06 06:34 PM
How do I hide words on a printed document, but see on screen? piltricia Excel Discussion (Misc queries) 2 February 15th 06 01:37 AM
my excel document won't open unless i go file, then open EB500 Excel Discussion (Misc queries) 1 June 3rd 05 06:42 PM
why must I open an Excel document twice to get it to open after . NottaBoy Excel Discussion (Misc queries) 1 May 17th 05 09:22 AM
When I open excel document it always ask if I want to open it in . dperkins Excel Discussion (Misc queries) 0 February 15th 05 08:11 PM


All times are GMT +1. The time now is 12:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"