Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to unhide a multiple sheets trigger by a checkbox

I have a protected workbook with only one sheet visible and the rest of them
hidden. I want to use a check box in sheet1 as a trigger to unhide xyz
sheets.

If chesk box value is True the sheets will be unhide if value is False
sheets should remain hidden
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default how to unhide a multiple sheets trigger by a checkbox

I inserted an activex checkbox and inserted the code in sheet1.


Private Sub CheckBox1_Change()
On Error Resume Next
ActiveWorkbook.Unprotect
ActiveWorkbook.Worksheets("xyz").Visible = Me.CheckBox1.Value '?????
ActiveWorkbook.Protect Structu=True, Windows:=False
End Sub

you need to modify this for the sheets you want to hide or run a loop as in
for all the ones.

dim i as long
for i = 2 to worksheets.count step 1
ActiveWorkbook.Worksheets(i).Visible = Me.CheckBox1.Value
next i



--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Duboa" wrote:

I have a protected workbook with only one sheet visible and the rest of them
hidden. I want to use a check box in sheet1 as a trigger to unhide xyz
sheets.

If chesk box value is True the sheets will be unhide if value is False
sheets should remain hidden

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
Unhide Multiple Sheets Bev Excel Discussion (Misc queries) 5 June 9th 09 04:01 PM
Unhide multiple sheets albertmb Excel Discussion (Misc queries) 3 November 24th 08 05:03 PM
Unhide multiple sheets all at once glenlee Excel Discussion (Misc queries) 3 August 11th 07 06:42 AM
How to unhide multiple sheets in one go Grd Excel Programming 2 March 9th 06 01:55 AM
Can I unhide multiple sheets at once? Brockli Excel Discussion (Misc queries) 1 February 24th 05 07:46 PM


All times are GMT +1. The time now is 06:48 PM.

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

About Us

"It's about Microsoft Excel"