![]() |
Disable menu selection
I would like to accomplish two things:
I have a password protected (both file, and modify levels) shared workbook (Office 2000). 1) I would like to disable the ability for anyone to "Accept/Reject" changes (Tools|Track Changes|Accept/Reject Changes drop down menu). Can I set a macro to run when the file opens to do this? and password protect the vb code, so that only I could potentially go into this? Please tell me what code I need to disable this menu item, or if there is a better way to do it. 2) Can I hide a column if the person entering the file is read-only? Please tell me what code I need to do this and where to put it. Thank you very much in advance. |
Hi Andy
1)Start here http://www.rondebruin.com/menuid.htm 2)Use this event in the thisworkbook module Private Sub Workbook_Open() If ThisWorkbook.ReadOnly = True Then MsgBox " Hide code " End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "andy" wrote in message ... I would like to accomplish two things: I have a password protected (both file, and modify levels) shared workbook (Office 2000). 1) I would like to disable the ability for anyone to "Accept/Reject" changes (Tools|Track Changes|Accept/Reject Changes drop down menu). Can I set a macro to run when the file opens to do this? and password protect the vb code, so that only I could potentially go into this? Please tell me what code I need to disable this menu item, or if there is a better way to do it. 2) Can I hide a column if the person entering the file is read-only? Please tell me what code I need to do this and where to put it. Thank you very much in advance. |
Hi Ron,
Thank you for your reply. The read-only issue is no longer needed, however disabling the menu sub-item is not. I reviewed the information you sent, and went on to the MS website, however I don't know how to get one more layer deeper than they show. The information only shows how to get to the "Track Changes...", which is ID #30138, however, I would like to disable a menu selection underneath of that called "Accept or Reject Changes...". How do I code the "Accept or Reject Changes..." of the: Tools|Track Changes|Accept or Reject Changes... sub menu? Also, do I need a reference to a library, or .dll? Thanks in advance. -----Original Message----- Hi Andy 1)Start here http://www.rondebruin.com/menuid.htm 2)Use this event in the thisworkbook module Private Sub Workbook_Open() If ThisWorkbook.ReadOnly = True Then MsgBox " Hide code " End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "andy" wrote in message ... I would like to accomplish two things: I have a password protected (both file, and modify levels) shared workbook (Office 2000). 1) I would like to disable the ability for anyone to "Accept/Reject" changes (Tools|Track Changes|Accept/Reject Changes drop down menu). Can I set a macro to run when the file opens to do this? and password protect the vb code, so that only I could potentially go into this? Please tell me what code I need to disable this menu item, or if there is a better way to do it. 2) Can I hide a column if the person entering the file is read-only? Please tell me what code I need to do this and where to put it. Thank you very much in advance. . |
Hi Andy
Sub GetAll_Submenu_Ids() Dim ctrl As Object For Each ctrl In CommandBars("Tools") _ .Controls("Track Changes").Controls MsgBox ctrl.Caption & Chr(13) & ctrl.ID Next ctrl End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "andy" wrote in message ... Hi Ron, Thank you for your reply. The read-only issue is no longer needed, however disabling the menu sub-item is not. I reviewed the information you sent, and went on to the MS website, however I don't know how to get one more layer deeper than they show. The information only shows how to get to the "Track Changes...", which is ID #30138, however, I would like to disable a menu selection underneath of that called "Accept or Reject Changes...". How do I code the "Accept or Reject Changes..." of the: Tools|Track Changes|Accept or Reject Changes... sub menu? Also, do I need a reference to a library, or .dll? Thanks in advance. -----Original Message----- Hi Andy 1)Start here http://www.rondebruin.com/menuid.htm 2)Use this event in the thisworkbook module Private Sub Workbook_Open() If ThisWorkbook.ReadOnly = True Then MsgBox " Hide code " End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "andy" wrote in message ... I would like to accomplish two things: I have a password protected (both file, and modify levels) shared workbook (Office 2000). 1) I would like to disable the ability for anyone to "Accept/Reject" changes (Tools|Track Changes|Accept/Reject Changes drop down menu). Can I set a macro to run when the file opens to do this? and password protect the vb code, so that only I could potentially go into this? Please tell me what code I need to disable this menu item, or if there is a better way to do it. 2) Can I hide a column if the person entering the file is read-only? Please tell me what code I need to do this and where to put it. Thank you very much in advance. . |
All times are GMT +1. The time now is 02:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com