Command Button Macro to Expand/Collapse Grouped Columns

G

George

Good Afternoon,
I'm not sure if this is possible but, what I'm trying to do is instead of
users seeing and using the +/- to expand column groups I'd like to use
command buttons and turn off the view of the groupings....An additional nice
feature of the button macro would be to unprotect/protect the sheet.

I appreciate any help you can offer in advance...

Respectfully,
Sam
 
A

Ayo

Sub cmdBtn()
Range("B:C").Columns.ShowDetail = False
End Sub

Try this: this is assuming column "A" has the +/- and column "B" and "C' are
part of that group.
 
G

George

Ayo Thank You for your response...My scenerio is a little different and if
you can give me a little more direction...The +/- is on Column "K" and
Columns "B -J" are part of the group...

Thanks Again.
 
G

George

Ayo,

I thought the same as you but I get an error message stating "Unable to set
ShowDetailproperty of the range class"...Any Idea's

Thanks
 

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