Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Hiding Columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David A. - 14 Sep 2007 18:12 GMT
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
FSt1 - 14 Sep 2007 21:48 GMT
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

> I need to know how to do this for rows instead of columns.
> I have the same issue but with rows instead.
[quoted text clipped - 15 lines]
> Application.ScreenUpdating = True
> End Sub
David A. - 14 Sep 2007 21:56 GMT
Thank you so much. I did want to touch anything and mess up what I have
already did.

Thanx,

> hi.
> read through your code. where is says column, change that to row. if it says
[quoted text clipped - 23 lines]
> > Application.ScreenUpdating = True
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.