PC Review


Reply
Thread Tools Rate Thread

Buttons Embedded in a Worksheet

 
 
=?Utf-8?B?V2VuZHk=?=
Guest
Posts: n/a
 
      30th May 2007
OK - I know - This is probably a basic questions for you experts, but I would
like to know how to add buttons to a worksheet that hide and unhide specific
colums, and how these commands/buttons are created.

I have inherited a workbook that someone else created, and now I need to add
more data to it in the same manner as the original author.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      30th May 2007
Bring up the Control Toolbox toolbar (Tools -> Customize -> Toolbars ->
Control Toolbox). Click on the Button icon and then click on the worksheet to
place one on your sheet. Right click the button and select Properties. Change
the Caption to something like Hide/Unhide. Double click on the button. This
will take you to the code window. Add something like the following the the
code that was added for you...

Private Sub CommandButton1_Click()
Columns("B:C").Hidden = Not Columns("B:C").Hidden
End Sub
--
HTH...

Jim Thomlinson


"Wendy" wrote:

> OK - I know - This is probably a basic questions for you experts, but I would
> like to know how to add buttons to a worksheet that hide and unhide specific
> colums, and how these commands/buttons are created.
>
> I have inherited a workbook that someone else created, and now I need to add
> more data to it in the same manner as the original author.
>
>

 
Reply With Quote
 
=?Utf-8?B?V2VuZHk=?=
Guest
Posts: n/a
 
      30th May 2007
Thanks Jim -
I have the button, and I pasted your code.
Now what? How do I save it, and make it work?



"Jim Thomlinson" wrote:

> Bring up the Control Toolbox toolbar (Tools -> Customize -> Toolbars ->
> Control Toolbox). Click on the Button icon and then click on the worksheet to
> place one on your sheet. Right click the button and select Properties. Change
> the Caption to something like Hide/Unhide. Double click on the button. This
> will take you to the code window. Add something like the following the the
> code that was added for you...
>
> Private Sub CommandButton1_Click()
> Columns("B:C").Hidden = Not Columns("B:C").Hidden
> End Sub
> --
> HTH...
>
> Jim Thomlinson
>
>
> "Wendy" wrote:
>
> > OK - I know - This is probably a basic questions for you experts, but I would
> > like to know how to add buttons to a worksheet that hide and unhide specific
> > colums, and how these commands/buttons are created.
> >
> > I have inherited a workbook that someone else created, and now I need to add
> > more data to it in the same manner as the original author.
> >
> >

 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      30th May 2007
You are probably still in design mode. There is a little triangle / ruler
icon on the Control Toolbox toolbar. Click it to exit design mode. You should
now be able to click the button to hide or unhide the columns...
--
HTH...

Jim Thomlinson


"Wendy" wrote:

> Thanks Jim -
> I have the button, and I pasted your code.
> Now what? How do I save it, and make it work?
>
>
>
> "Jim Thomlinson" wrote:
>
> > Bring up the Control Toolbox toolbar (Tools -> Customize -> Toolbars ->
> > Control Toolbox). Click on the Button icon and then click on the worksheet to
> > place one on your sheet. Right click the button and select Properties. Change
> > the Caption to something like Hide/Unhide. Double click on the button. This
> > will take you to the code window. Add something like the following the the
> > code that was added for you...
> >
> > Private Sub CommandButton1_Click()
> > Columns("B:C").Hidden = Not Columns("B:C").Hidden
> > End Sub
> > --
> > HTH...
> >
> > Jim Thomlinson
> >
> >
> > "Wendy" wrote:
> >
> > > OK - I know - This is probably a basic questions for you experts, but I would
> > > like to know how to add buttons to a worksheet that hide and unhide specific
> > > colums, and how these commands/buttons are created.
> > >
> > > I have inherited a workbook that someone else created, and now I need to add
> > > more data to it in the same manner as the original author.
> > >
> > >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
plot graph from multiple worksheet as embedded chart object on every worksheet Jeffrey.Tiong@gmail.com Microsoft Excel Worksheet Functions 2 24th Aug 2006 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet Jeffrey.Tiong@gmail.com Microsoft Excel Programming 2 24th Aug 2006 05:26 PM
plot graph from multiple worksheet as embedded chart object on every worksheet jeftiong Microsoft Excel Discussion 0 23rd Aug 2006 01:53 PM
plot graph from multiple worksheet as embedded chart object on every worksheet jeftiong Microsoft Excel New Users 0 23rd Aug 2006 01:50 PM
Re: Visibility Problem of Embedded Buttons in Worksheet Dave Peterson Microsoft Excel Programming 2 10th Jun 2004 03:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:49 PM.