ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing links when protected (https://www.excelbanter.com/excel-programming/355390-changing-links-when-protected.html)

[email protected]

Changing links when protected
 
I currently have a workbook which is protected along with all the
worksheets. Certain cells are unprotected to allow users to enter data.

Certain users will be required to edit/change links to other workbooks.
The cells containing the links are not individually protected. However,
Excel will not allow users to edit or change the external links when
protection to the workbook/sheets is enabled. It is essential to
maintain the integrity of the workbook and sheets and therefore issuing
a password to users is not an option.

Is there a method where a user can run a macro which temporarily
removes the protection, brings up the edit/change links interface so
that the user can edit these and then the macro protects the
workbook/sheets once again before exiting the macro? The user must have
the ability to navigate in the interface window to change/edit these
links and the macro must NOT allow users to exit before protection is
replaced and must not be able to enter into any other form of editing
during the macro.

Please can anyone help????


Dave Peterson

Changing links when protected
 
In light testing, I didn't have a problem if the workbook was protected, but if
any worksheet is protected (whether it had links or not), I had trouble.

But you could unprotect each sheet, display a dialog and then reprotect all the
worksheets.

I had one sheet in this workbook example:

Option Explicit
Sub testme()
Dim myPWD As String
myPWD = "hi there"
Worksheets("sheet1").Unprotect Password:=myPWD
Application.Dialogs(xlDialogOpenLinks).Show
Worksheets("sheet1").Protect Password:=myPWD
End Sub



wrote:

I currently have a workbook which is protected along with all the
worksheets. Certain cells are unprotected to allow users to enter data.

Certain users will be required to edit/change links to other workbooks.
The cells containing the links are not individually protected. However,
Excel will not allow users to edit or change the external links when
protection to the workbook/sheets is enabled. It is essential to
maintain the integrity of the workbook and sheets and therefore issuing
a password to users is not an option.

Is there a method where a user can run a macro which temporarily
removes the protection, brings up the edit/change links interface so
that the user can edit these and then the macro protects the
workbook/sheets once again before exiting the macro? The user must have
the ability to navigate in the interface window to change/edit these
links and the macro must NOT allow users to exit before protection is
replaced and must not be able to enter into any other form of editing
during the macro.

Please can anyone help????


--

Dave Peterson

JamesJordan

Changing links when protected
 
Also,
It could not hurt to have error handling that proects it if any error
occurs while running the macro.



All times are GMT +1. The time now is 08:51 AM.

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