Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default protect command button

I know how to password protect an Excel VBA project, but is there any way to
protect a worksheet command button object itself (i.e., prevent a user from
adding Visual Basic to the menu bar, clicking into VB design mode, and
moving, resizing, or deleting the command button?)

Thanks ...

Bill Morgan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default protect command button

Go into visual basic design mode and select 'Tools' from the menu bar. Then
select VBAProject Properties...

Select the protection tab.

This will ensure nobody can modify your command button with the correct
password.

Hope this help.

"bill_morgan_3333" wrote:

I know how to password protect an Excel VBA project, but is there any way to
protect a worksheet command button object itself (i.e., prevent a user from
adding Visual Basic to the menu bar, clicking into VB design mode, and
moving, resizing, or deleting the command button?)

Thanks ...

Bill Morgan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default protect command button

Francis,

Thanks for your response. I can protect the VBA code, as you suggest, but a
user can still add the VB feature to the toolbar and click the design button
so that he can move my command button around (or event delete it). I could
make the workbook "read-only" but then the user can still move the comman
button while inside the workbook.

I'm wondering if there is a way to completely protect the command button so
the user cannot move/edit it in any way, even in a read-only version of the
workbook.

Thanks again ...



"bill_morgan_3333" wrote:

I know how to password protect an Excel VBA project, but is there any way to
protect a worksheet command button object itself (i.e., prevent a user from
adding Visual Basic to the menu bar, clicking into VB design mode, and
moving, resizing, or deleting the command button?)

Thanks ...

Bill Morgan


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default protect command button

Hi Bill

One of the ways which I have handled the situation you mentioned is to hide
all the toolbars including the menu when your workbook is opened. Create and
display your own customised toolbars and menu.

However, make sure that the default toolbars and menu are restored when you
close your workbook.

Hope this help.

"bill_morgan_3333" wrote:

Francis,

Thanks for your response. I can protect the VBA code, as you suggest, but a
user can still add the VB feature to the toolbar and click the design button
so that he can move my command button around (or event delete it). I could
make the workbook "read-only" but then the user can still move the comman
button while inside the workbook.

I'm wondering if there is a way to completely protect the command button so
the user cannot move/edit it in any way, even in a read-only version of the
workbook.

Thanks again ...



"bill_morgan_3333" wrote:

I know how to password protect an Excel VBA project, but is there any way to
protect a worksheet command button object itself (i.e., prevent a user from
adding Visual Basic to the menu bar, clicking into VB design mode, and
moving, resizing, or deleting the command button?)

Thanks ...

Bill Morgan


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default protect command button

Francis,

This sounds like the best alternative out there. Thanks for the suggestion ...

"Francis Ang" wrote:

Hi Bill

One of the ways which I have handled the situation you mentioned is to hide
all the toolbars including the menu when your workbook is opened. Create and
display your own customised toolbars and menu.

However, make sure that the default toolbars and menu are restored when you
close your workbook.

Hope this help.

"bill_morgan_3333" wrote:

Francis,

Thanks for your response. I can protect the VBA code, as you suggest, but a
user can still add the VB feature to the toolbar and click the design button
so that he can move my command button around (or event delete it). I could
make the workbook "read-only" but then the user can still move the comman
button while inside the workbook.

I'm wondering if there is a way to completely protect the command button so
the user cannot move/edit it in any way, even in a read-only version of the
workbook.

Thanks again ...



"bill_morgan_3333" wrote:

I know how to password protect an Excel VBA project, but is there any way to
protect a worksheet command button object itself (i.e., prevent a user from
adding Visual Basic to the menu bar, clicking into VB design mode, and
moving, resizing, or deleting the command button?)

Thanks ...

Bill Morgan




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
Protect cell but allow copy command? Carole O Excel Worksheet Functions 12 March 19th 10 08:49 PM
password protect unhide sheet command jimmill Excel Discussion (Misc queries) 1 February 24th 09 10:08 PM
command button add another command Wanna Learn Excel Discussion (Misc queries) 5 December 7th 08 11:42 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM
Command Button vs Form Button T K Excel Programming 4 August 26th 03 07:26 PM


All times are GMT +1. The time now is 10:07 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"