Command Button Macro to Expand/Collapse Grouped Columns

  • Follow


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
0
Reply Utf 2/25/2010 5:37:02 PM

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.
"George" wrote:

> 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
0
Reply Utf 2/25/2010 6:19:02 PM


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.

"Ayo" wrote:

> 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.
> "George" wrote:
> 
> > 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
0
Reply Utf 2/25/2010 6:55:02 PM

Try
Sub cmdBtn()
>     Range("B:J").Columns.ShowDetail = False
> End Sub


"George" wrote:

> 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.
> 
> "Ayo" wrote:
> 
> > 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.
> > "George" wrote:
> > 
> > > 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
0
Reply Utf 2/25/2010 7:11:01 PM

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

"Ayo" wrote:

> Try
> Sub cmdBtn()
> >     Range("B:J").Columns.ShowDetail = False
> > End Sub
> 
> 
> "George" wrote:
> 
> > 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.
> > 
> > "Ayo" wrote:
> > 
> > > 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.
> > > "George" wrote:
> > > 
> > > > 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
0
Reply Utf 2/25/2010 7:29:02 PM

4 Replies
3217 Views

(page loaded in 0.106 seconds)


Reply: