#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default Hide sheet

How do I write a procedure that will hide the worksheet except for a certain
range of cells?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Hide sheet

You can of course hide entire columns and rows, but that means you have to
have a rectangular collection of cells on show.

You could consider masking the cells, set background and foreground colors
the same, lock these cells, unlock the cells you want to show (if need you
need to edit) and then protect the sheet.




--

Regards,
Nigel




"ranswert" wrote in message
...
How do I write a procedure that will hide the worksheet except for a
certain
range of cells?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Hide sheet

Sub hidenonused()
With Range("a1:b12")
lr = .Rows.count + 1
'MsgBox lr
lc = .Columns.count + 1
'MsgBox lc
'MsgBox Columns.count
End With
Rows(lr & ":" & Rows.count).Hidden = True
Range(Cells(1, lc), Cells(1, Columns.count)).EntireColumn.Hidden = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ranswert" wrote in message
...
How do I write a procedure that will hide the worksheet except for a
certain
range of cells?


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
hide sheet ranswert Excel Programming 2 January 30th 08 04:14 PM
Create Sheet, Hide Sheet Dave Excel Discussion (Misc queries) 2 October 30th 07 03:40 PM
Hide Sheet when another sheet is chosen AJ Excel Programming 2 October 10th 07 08:28 AM
hide sheet? uncheck sheet tabs? or ??? NetComm888 Excel Programming 1 February 10th 04 04:38 AM
Hide Sheet Bob Phillips[_5_] Excel Programming 2 August 7th 03 01:40 PM


All times are GMT +1. The time now is 09:28 AM.

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"