Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide/Unhide Help


I have been through the search on numerious occasions and can't find an
answer. Here is my problem.

I have a sheet for my work load. I want to hide rows that have a blank
cell in colum B when a key is pressed. However, I want the rows to
unhide when the workbook is opened.

Any help would be greatly appreciated.

Thanks,
Danno


--
Danno
------------------------------------------------------------------------
Danno's Profile: http://www.excelforum.com/member.php...o&userid=10044
View this thread: http://www.excelforum.com/showthread...hreadid=564922

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Hide/Unhide Help

Hi Danno,

If you have a subroutine that will hide/unhide as needed:

Public Sub ToggleRows(rbHide As Boolean)
Dim rng As Range

Set rng = Sheet1.UsedRange.Columns(2).SpecialCells( _
xlCellTypeBlanks)

If Not rng Is Nothing Then
rng.EntireRow.Hidden = rbHide
End If
End Sub

You can call this with a True argument when hiding the rows with blank col
B. You can call this subroutine with a False argument from the
Workbook_Open event subroutine (double-click ThisWorkbook icon and paste in
the following code):

Private Sub Workbook_Open()
ToggleRows False
End Sub

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


Danno wrote:
I have been through the search on numerious occasions and can't find
an answer. Here is my problem.

I have a sheet for my work load. I want to hide rows that have a blank
cell in colum B when a key is pressed. However, I want the rows to
unhide when the workbook is opened.

Any help would be greatly appreciated.

Thanks,
Danno



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide/Unhide Help


Jake,

Thank you for the reply. I am not sure what I am doing wrong. Kee
getting exictuable errors.

Dann

--
Dann
-----------------------------------------------------------------------
Danno's Profile: http://www.excelforum.com/member.php...fo&userid=1004
View this thread: http://www.excelforum.com/showthread.php?threadid=56492

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Hide/Unhide Help

Danno,

Danno wrote:
Thank you for the reply. I am not sure what I am doing wrong. Keep
getting exictuable errors.


In my example, I used Sheet1 as the worksheet object. You should change
this to Sheets("<yoursheetname") - other than that, it should work. Can
you post your code and indicate the line that raises the error along with
the error # and description?

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


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/Unhide row VBA Scafidel[_2_] Excel Discussion (Misc queries) 1 March 23rd 09 05:28 PM
Hide/Unhide [email protected] Excel Discussion (Misc queries) 0 July 24th 08 05:02 PM
hide/unhide brownti Excel Discussion (Misc queries) 3 February 6th 07 07:14 PM
Hide/unhide Jock W Excel Worksheet Functions 4 October 4th 05 05:02 PM
Hide and unhide Marcel Excel Discussion (Misc queries) 1 March 10th 05 11:50 PM


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