Promote / Demote

  • Thread starter Thread starter Giuseppe
  • Start date Start date
G

Giuseppe

I will like to hide and exanpand columns in a spread
sheet. I was sucesfully doing this grouping the columns in
the Data menu and using the outline function. Does anybody
know hat to hide and show the columns fron a VBA code?

Thanks,

Giuseppe
 
Hi,

To hide the columns A to K :
Columns("A:K").Hidden = True

to show :
Columns("A:K").Hidden = false

With a loop you can do the same thing as follows :

Dim i as integer

i = 1

For i = 1 to 10

Columns(i).Hidden = true

Nex
 
The easiest way is to record a macro while you do it.

Regards
BrianB
==========================================
 
Back
Top