Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Help with Make Visible Rows

Hello, all.
I am building a quick spreadsheet tool in MS Excel 2000. I have a
predefined range of 100x100 cells, of which the the top left 25x25
needs to be initially visible. What I'd like to do is have a cell
available for user input to key in the necessary number of cells
needed to be visible. The smallest range will always be 25x25. So
any user entry of value 1-25 will result in the minimum 25x25 range,
but a value of 26 will make visible 1 extra row and column.

Is this possible in VBA? I've never been good at the programming
thing, and any help would be greatly appreciated!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default VBA Help with Make Visible Rows

With the block size entered in cell A1:


Sub MakeBlockVisible()
Dim AreaSize As Integer

AreaSize = Application.Min(255, Application.Max(25, Range("A1").Value))
Cells.EntireColumn.Hidden = False
Cells.EntireRow.Hidden = False

Rows(AreaSize + 1 & ":" & Rows.Count).EntireRow.Hidden = True
Range(Columns(AreaSize + 1), Columns(Columns.Count)).EntireColumn.Hidden = True

End Sub


HTH,
Bernie
MS Excel MVP


wrote in message ups.com...
Hello, all.
I am building a quick spreadsheet tool in MS Excel 2000. I have a
predefined range of 100x100 cells, of which the the top left 25x25
needs to be initially visible. What I'd like to do is have a cell
available for user input to key in the necessary number of cells
needed to be visible. The smallest range will always be 25x25. So
any user entry of value 1-25 will result in the minimum 25x25 range,
but a value of 26 will make visible 1 extra row and column.

Is this possible in VBA? I've never been good at the programming
thing, and any help would be greatly appreciated!



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
How do I make one column or row always visible? Ao Excel Discussion (Misc queries) 8 April 23rd 23 09:01 PM
Make Object(s) Visible Dennis Excel Discussion (Misc queries) 2 May 19th 09 06:24 PM
Fast way to make rows visible and invisible [email protected] Excel Programming 4 March 9th 06 07:17 PM
I need to make MS word visible..please help Steven Excel Programming 4 October 19th 05 05:44 PM
make outlook visible gopher Excel Programming 5 January 5th 05 06:15 PM


All times are GMT +1. The time now is 03:45 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"