Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default How to program a toggle control button

Hi everybody,
I am trying to create toggle button to alternately protect and unprotect my
excel sheet. How can I solve this problem since I know very little about vba.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to program a toggle control button

How about an alternative?

Add a button to your favorite toolbar.
(in xl2003 menus)
Tools|Customize|Commands tab|Tools category

Scroll down the righthand side and look for "Protect Sheet"

Drag that icon to your favorite toolbar.

In xl2007, you can customize the quick access toolbar the same kind of way:
http://www.rondebruin.nl/notinribbon.htm
(from Ron de Bruin's site)

Arup C wrote:

Hi everybody,
I am trying to create toggle button to alternately protect and unprotect my
excel sheet. How can I solve this problem since I know very little about vba.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default How to program a toggle control button

Hi Dave,
Thanks a lot for your help but I have to use this file on other computers
also in your suggested way I am able to use this shortcut only on one
computer as the custom toolbar setting is lost when I use the format on other
computers. To enable this I have to copy the xlb file along with this file.
Do you have any solution for this problem? I will be looking forward for your
help.

"Dave Peterson" wrote:

How about an alternative?

Add a button to your favorite toolbar.
(in xl2003 menus)
Tools|Customize|Commands tab|Tools category

Scroll down the righthand side and look for "Protect Sheet"

Drag that icon to your favorite toolbar.

In xl2007, you can customize the quick access toolbar the same kind of way:
http://www.rondebruin.nl/notinribbon.htm
(from Ron de Bruin's site)

Arup C wrote:

Hi everybody,
I am trying to create toggle button to alternately protect and unprotect my
excel sheet. How can I solve this problem since I know very little about vba.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to program a toggle control button

You could create a macro that would show the sheet protection dialog.

Then you (as the developer) don't have to worry about passwords:

Option Explicit
Sub ShowProtDialog()
Application.Dialogs(xlDialogProtectDocument).Show
End Sub

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

In xl2007, those toolbars and menu modifications will show up under the addins.

Arup C wrote:

Hi Dave,
Thanks a lot for your help but I have to use this file on other computers
also in your suggested way I am able to use this shortcut only on one
computer as the custom toolbar setting is lost when I use the format on other
computers. To enable this I have to copy the xlb file along with this file.
Do you have any solution for this problem? I will be looking forward for your
help.

"Dave Peterson" wrote:

How about an alternative?

Add a button to your favorite toolbar.
(in xl2003 menus)
Tools|Customize|Commands tab|Tools category

Scroll down the righthand side and look for "Protect Sheet"

Drag that icon to your favorite toolbar.

In xl2007, you can customize the quick access toolbar the same kind of way:
http://www.rondebruin.nl/notinribbon.htm
(from Ron de Bruin's site)

Arup C wrote:

Hi everybody,
I am trying to create toggle button to alternately protect and unprotect my
excel sheet. How can I solve this problem since I know very little about vba.


--

Dave Peterson


--

Dave Peterson
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
[Office 2007] Auto-hide ribbon toggle button and control recent do Yishion Excel Programming 2 June 4th 07 08:27 PM
program a toggle between worksheets in the same file K! Excel Programming 1 July 31st 06 04:28 PM
Adding .xla button for Toggle Calculation Button Mike Excel Programming 5 August 19th 05 01:55 PM
Toggle change control button face id & caption mikeburg[_2_] Excel Programming 1 June 25th 05 03:00 AM


All times are GMT +1. The time now is 12:51 PM.

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

About Us

"It's about Microsoft Excel"