ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Restricting Access and applying a button (https://www.excelbanter.com/excel-programming/335518-restricting-access-applying-button.html)

funkymonkUK[_57_]

Restricting Access and applying a button
 

Hi I want myself and a colleague to have an button put on our toolbar
(which is only opened and displayed when the workbook is opened or
activated. the macro which will be attached to the button will just use
a password and lock or unlock all sheets in the activeworkbook. because
of this I do not want other users to have this button on their screen.
any ideas how to implement this?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=390116


Tom Ogilvy

Restricting Access and applying a button
 
Use the workbook_open and the workbook activate and deactivate events to
manage the toolbar. It can check

Environ("Username")

to determine if it is you or your colleage and react appropriately.

As far as a password, you could include prompt in the code for your button
to ask for a password.

Here are some general articles on working with commandbars:

http://support.microsoft.com/?id=159619
XL97: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/?id=213550
XL2000: Sample Macros for Customizing Menus and Submenus


http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R)
Excel 97
File Name: WE1183.EXE
File Size: 58041 bytes
File Date: 06/20/97
Keywords: kbfile kbappnote
Description: This Application Note can help you learn techniques for writing
Visual Basic(R) for Applications code to customize menus in Microsoft Excel
97. This Application Note contains code examples that you can use with the
following elements: menu bars, menus, menu items, submenus, and shortcut
menus.


http://support.microsoft.com/?id=288771
HOWTO: Create a Transparent Picture For Office CommandBar Buttons


For information on events, see Chip Pearson's page
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy



"funkymonkUK"
wrote in message
...

Hi I want myself and a colleague to have an button put on our toolbar
(which is only opened and displayed when the workbook is opened or
activated. the macro which will be attached to the button will just use
a password and lock or unlock all sheets in the activeworkbook. because
of this I do not want other users to have this button on their screen.
any ideas how to implement this?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile:

http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=390116




funkymonkUK[_61_]

Restricting Access and applying a button
 

How do I get more Support files which you so kindly provided

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=39011


Tom Ogilvy

Restricting Access and applying a button
 
http://support.microsoft.com

should take you to the search screen for the Microsoft Knowledge Base. If
you choose advanced search you can restrict the search to the product you
specify.

--
Regards,
Tom Ogilvy

"funkymonkUK"
wrote in message
...

How do I get more Support files which you so kindly provided?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile:

http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=390116





All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com