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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding Columns - Problem

Status
Not open for further replies.

nashlow

MIS
Dec 22, 2002
5
AU
Hi there,
Part of a bigger picture, is to hide a number of columns from an imported spreadsheet. Unfortunately, hiding the few nominated columns via CBA ends up hiding ALL the data columns on the spreadsheet. Does anyone know whats happening and/or how can I overcome this Excel problem?

Regards,
Nashlow
 
What do you mean by "imported spreadsheet"? Imported from where/what ... and how?



Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Please post the VBA code you are currently using.


Regards,
Mike
 
Hi there,
Sorry I did realise I missed putting enough info in my post.

The spreadsheet is exported from Lotus database as an excel spreadsheet. Once in Excel, I applied a VBA code to hide the unwanted columns with this code:

Range("A:A").Select
Selection.EntireColumn.Hidden = True

However, what this code does is hide the entire columns from A-Z & AA-AZ. Hope this helps.

Nashlow
 
Are there any merged cells in the dataset? That could cause this behavior.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Why not simply this ?
Columns(1).Hidden = True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top