Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JimH
 
Posts: n/a
Default Button hides unhides columns, how?

I inherited a workbook where in some tabs buttons are used to hide and unhide
columns. These buttons appear above the column headers and are labeled with
the + sign. When clicked several columns are unhidden and a button appears
with a "-" sign. Clicking this button in turn rehides the columns. How is
this done? Are these command buttons? How are they inserted above the
column headers? I've not been able to figure out how to see the code behind
the buttons. Any guidance will be greatly appreciated.
--
JimH
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

check in Help for Group and UnGroup. This is an option accessible off the
Data menu


"JimH" wrote:

I inherited a workbook where in some tabs buttons are used to hide and unhide
columns. These buttons appear above the column headers and are labeled with
the + sign. When clicked several columns are unhidden and a button appears
with a "-" sign. Clicking this button in turn rehides the columns. How is
this done? Are these command buttons? How are they inserted above the
column headers? I've not been able to figure out how to see the code behind
the buttons. Any guidance will be greatly appreciated.
--
JimH

  #3   Report Post  
JimH
 
Posts: n/a
Default

Thank you. So easy when you know. Works like a charm.

"Duke Carey" wrote:

check in Help for Group and UnGroup. This is an option accessible off the
Data menu


"JimH" wrote:

I inherited a workbook where in some tabs buttons are used to hide and unhide
columns. These buttons appear above the column headers and are labeled with
the + sign. When clicked several columns are unhidden and a button appears
with a "-" sign. Clicking this button in turn rehides the columns. How is
this done? Are these command buttons? How are they inserted above the
column headers? I've not been able to figure out how to see the code behind
the buttons. Any guidance will be greatly appreciated.
--
JimH

  #4   Report Post  
PCLIVE
 
Posts: n/a
Default

Try this for example:

Create a Macro with the following (probably a little unorthodox, but it
works)


Sub HideUnhideSheet()
If Sheets("Sheet2").Visible = False Then GoTo FalseHide Else GoTo
TrueUnhide

FalseHide:
Sheets("Sheet2").Visible = True
Sheets("Sheet2").Activate
End

TrueUnhide:
Sheets("Sheet2").Visible = False
Sheets(1).Activate

End Sub


Then:
Goto View-Toolbars-Customize
Click 'New'
Give your new Toolbar a name and click OK
With your new Customer Toolbar highlighted, click the Commands tab.
Scroll down and select, say, 'Macros' and then drag the Custom Button face
to your new Toolbar.
Then right-click on your new Toolbar button and select 'Assign Macro'.
Select the Macro that you just created and click OK.
Click Close on the Customize window.
You may have to exit Design Mode at this point.
Your button is now created and ready to use.

I'm sure there are other ways of doing this, but this works.



"JimH" wrote in message
...
I inherited a workbook where in some tabs buttons are used to hide and
unhide
columns. These buttons appear above the column headers and are labeled
with
the + sign. When clicked several columns are unhidden and a button
appears
with a "-" sign. Clicking this button in turn rehides the columns. How
is
this done? Are these command buttons? How are they inserted above the
column headers? I've not been able to figure out how to see the code
behind
the buttons. Any guidance will be greatly appreciated.
--
JimH



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM
Hot Button Lookup DBuche Excel Worksheet Functions 0 February 2nd 05 09:27 PM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM
Columns in Excel will not allow user to click in them Kim Excel Discussion (Misc queries) 1 December 28th 04 06:37 PM


All times are GMT +1. The time now is 04:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"