A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Button hides unhides columns, how?



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2005, 09:14 PM
JimH
external usenet poster
 
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  
Old April 20th, 2005, 09:23 PM
Duke Carey
external usenet poster
 
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  
Old April 20th, 2005, 09:48 PM
JimH
external usenet poster
 
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  
Old April 20th, 2005, 09:59 PM
PCLIVE
external usenet poster
 
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can MOUSE_EVENT API call tell me which mouse button is pressed? Bill Mitchell Using Forms 0 February 23rd, 2005 07:25 PM
Button to sort/ and button to open another form Beverly76 Using Forms 3 December 29th, 2004 07:03 AM
Excel columns problem Charlie Johnson General Discussion 4 October 12th, 2004 04:40 PM
Average 5 columns of data skipping blank columns marvin Worksheet Functions 10 January 28th, 2004 06:33 PM


All times are GMT +1. The time now is 04:52 PM.


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