hide columns with a "+"

  • Thread starter hide columns with + button
  • Start date
H

hide columns with + button

How can I hide and unhide columns with a "+" button? It means I can click the
"+" to hide columns, then click "+" to unhide the columns.
 
P

pomegranate-man

How can I hide and unhide columns with a "+" button? It means I can
click the "+" to hide columns, then click "+" to unhide the columns.

Look in Excel's built-in Help for "Create an outline" and read the part
about "Outline the data manually."

It uses "+" to unhide and "-" to hide; hope that doesn't spoil it for you.

For the "detail columns" select those to be hidden. The column after that
can be left blank if there's no "summary" information to display there.
 
F

FSt1

hi
your post is a tad unclear but here is something i did years ago for our
engineering deparment. they wanted to hide/unhide a column that displayed
either metric or english measures. i "disguised" a command button as a column
header and put this code behide it. maybe you can use it as a template(?!?!?)
or maybe get ideas???
Private Sub CB1_Click()
If Columns("C:C").Hidden = True Then
Columns("C:C").Hidden = False
CB1.BackColor = RGB(0, 0, 255)
'CB1.ForeColor =
CB1.Caption = "Metric"
Columns("D:D").Hidden = True
Else
Columns("C:C").Hidden = True
Columns("D:D").Hidden = False
CB1.BackColor = RGB(245, 30, 5)
'CB1.ForeColor =
CB1.Caption = "English"
End If
End Sub

yeah, i know. not pretty but it did work. this is a directy copy/paste.

regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top