Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Hiding Columns

I need to know how to do this for rows instead of columns.
I have the same issue but with rows instead.


Public Sub MyHide()
Dim rngCell As Range
Dim lngNumColumns As Long

Application.ScreenUpdating = False

lngNumColumns = ActiveSheet.UsedRange.Columns.Count

For Each rngCell In Range("A3").Resize(1, lngNumColumns)
With rngCell
.EntireColumn.Hidden = (.Value = 1)
End With
Next rngCell

Application.ScreenUpdating = True
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Hiding Columns

hi.
read through your code. where is says column, change that to row. if it says
columns, change that to rows. the command to hide and unhide rows and columns
is the same except for row or column.

regards
FSt1

"David A." wrote:

I need to know how to do this for rows instead of columns.
I have the same issue but with rows instead.


Public Sub MyHide()
Dim rngCell As Range
Dim lngNumColumns As Long

Application.ScreenUpdating = False

lngNumColumns = ActiveSheet.UsedRange.Columns.Count

For Each rngCell In Range("A3").Resize(1, lngNumColumns)
With rngCell
.EntireColumn.Hidden = (.Value = 1)
End With
Next rngCell

Application.ScreenUpdating = True
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Hiding Columns

Thank you so much. I did want to touch anything and mess up what I have
already did.

Thanx,

"FSt1" wrote:

hi.
read through your code. where is says column, change that to row. if it says
columns, change that to rows. the command to hide and unhide rows and columns
is the same except for row or column.

regards
FSt1

"David A." wrote:

I need to know how to do this for rows instead of columns.
I have the same issue but with rows instead.


Public Sub MyHide()
Dim rngCell As Range
Dim lngNumColumns As Long

Application.ScreenUpdating = False

lngNumColumns = ActiveSheet.UsedRange.Columns.Count

For Each rngCell In Range("A3").Resize(1, lngNumColumns)
With rngCell
.EntireColumn.Hidden = (.Value = 1)
End With
Next rngCell

Application.ScreenUpdating = True
End Sub


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
Hiding Columns SnareHiHat Excel Discussion (Misc queries) 2 October 16th 09 02:10 PM
Help with hiding columns ExcelDave Excel Programming 3 May 27th 06 12:46 AM
Hiding columns Richard Excel Programming 1 November 2nd 05 09:24 AM
Hiding Columns belony Excel Discussion (Misc queries) 4 June 15th 05 12:27 AM
Not Hiding Columns SS[_3_] Excel Programming 1 February 11th 04 10:27 PM


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