Formerly Best Training
© 2024 STL. All Rights Reserved.
All prices offered for business users and exclude VAT. E&OE
2nd Floor, CA House, 1 Northey Street, Limehouse Basin, London, E14 8BT. United Kingdom
Forum home » Delegate support and help forum » Microsoft VBA Training and help » Excel VBA
Resolved · High Priority · Version 2007
Cyrus has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Hi, could anyone help me with VBA code for hiding columns in a workbook with 10 various worksheet?
For example, sheet 1, hide column G:G, K:K, & M:M
Sheet 2 hide column B:B, F:F, H:H
and the columns varies per each worksheet.
The purpose is to have a printable with with the remaining data.
Thanks
Cy
Hi Cyrus, thanks for your query. It's going to look a lot like this:
Range("G:G,K:K,M:M").Select
Selection.EntireColumn.Hidden = True
...for each sheet you need.
Hope this helps,
Anthony
Fri 2 Mar 2012: Automatically marked as resolved.
|
VBA tip:Use GoTo to Select A Cell With VBATo select a certain cell on a Worksheet you can use: |
We'll call during UK business hours
Server loaded in 0.07 secs.