PC Review

Thread Tools Rate Thread

Re: hide coloumn

Don Guillett
Posts: n/a
      5th Mar 2012
On Monday, March 5, 2012 12:29:33 PM UTC-6, kalpesh wrote:
> Hello,
> i like to hide all column except column "A,B,C,D" with worksheet 1 is
> active only for macro

You didn't mention excel version so this should work with all

Sub hidecolumns()
Dim lc As Long
With ActiveSheet
lc = Cells(1, "d").End(xlToRight).Column
.Columns.Hidden = False
.Columns(5).Resize(, lc - 4).Hidden = True
End With
End Sub
Reply With Quote

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort one coloumn according to another coloumn on another worksheet Sunir M S Microsoft Excel Worksheet Functions 0 6th Dec 2009 10:59 AM
how to transfer time from datetime coloumn to another coloumn YMPN Microsoft ASP .NET 2 25th Jan 2007 06:22 PM
When i try to edit a coloumn in datagrid and calculate the sum of two coloumn in third coloumn alok bansal via .NET 247 Microsoft Dot NET Framework Forms 0 8th Apr 2005 08:48 AM
How to hide a coloumn of the listview =?Utf-8?B?TGkgUGFuZw==?= Microsoft VB .NET 3 23rd Aug 2004 02:42 PM
Selecting every fourth cell in a coloumn hke Microsoft Excel Programming 2 14th Oct 2003 10:51 AM




All times are GMT +1. The time now is 01:16 PM.