Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to unhide some columns in Excel?

Status
Not open for further replies.

feipezi

IS-IT--Management
Aug 10, 2006
316
US
Hi,

I have a workbook where one of the tabs has some columns hidden. I tried to unhide those columns but failed. As I know, we have tabs "xlveryhidden" and not the columns or rows, are they. Someone said it was sort of Excel bug and I doubted it. But how can I get them unhidden? Generally, as you move your cursor to the border of a hidden column, you will be able to see a double-pipe "||" and double-click the pipe and the column will be visible. In my case, nothing happened.

Please advise.

Thanks in advance.
 
Have you tried this simple code:

[tt]Cells.EntireColumn.Hidden = False
[/tt]

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Hi,

Thanks for the quick return, guys!

Here goes the code that is not working:


Sub tnt()
Range("a1:f1").EntireColumn.Hidden = 0
'Selection.EntireColumn.Hidden = 0
End Sub


The code works on some workbooks and tabs, not the one I was talking about. Too bad I couldn't send you the sheet.

Thanks again.
 
What is the reference of Selection?

I'd use...
Code:
Sub tnt()
Range("a1:f1").EntireColumn.Hidden = FALSE

End Sub

Or TRUE
 
Somehow using "0" is the same thing as "False". No, I still cannot unhide those columns.

Thanks anyway.

 
If you select A1, you'll see A1 in the Name Box.

TAB and you'll see B1, etc.

Do you see the reference for the "hidden" column? If it's really hidden, you'll never see it in the Name Box! Your column may seem hidden because the Column Width is very small.
 
Just a guess here, but could it be that if the workbook/worksheet is protected in same way, that’s why you cannot un-hide columns?

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
There may be still a problem with columns width. Try to add:
Range("a1:f1").ColumnWidth = Range("a1:f1").Parent.StandardWidth

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top