Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i have a file with many sheets, all protected. i want select cells in
one protected sheet, go to another protected sheet, select a cell, then havea a macro unprotect the sheet, paste the cells, then protect the sheet again. thanks, Tonso |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A couple of possibilities. One would be to change the nature of the sheet
protection to UserInterfaceOnly at which point code can modify the sheet, but not the user. That being said here is some code for protecting and unprotecting all ot the sheets. Put this in it's own seperate module... Option Explicit Option Private Module Private Const m_cModule As String = "modProtectUnprotect" Private Const m_cPassword As String = "MyPassword" Public Sub ProtectAll() Dim wks As Worksheet For Each wks In Worksheets On Error Resume Next wks.Protect Password:=m_cPassword ', UserInterfaceOnly:=True Next wks End Sub Public Sub UnProtectAll() Dim wks As Worksheet For Each wks In Worksheets On Error Resume Next wks.UnProtect Password:=m_cPassword Next wks End Sub -- HTH... Jim Thomlinson "Tonso" wrote: i have a file with many sheets, all protected. i want select cells in one protected sheet, go to another protected sheet, select a cell, then havea a macro unprotect the sheet, paste the cells, then protect the sheet again. thanks, Tonso |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy & paste to protected sheet | Excel Discussion (Misc queries) | |||
Copy paste Macro in a Protected Sheet | Excel Discussion (Misc queries) | |||
How can I copy/paste protected cells in excel | Excel Discussion (Misc queries) | |||
allow me to copy and paste in a protected worksheet | New Users to Excel | |||
Copy/Paste a protected cell | Excel Discussion (Misc queries) |