Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unprotect workbook
Hi,
To unprotect a sheet with a click on a pushbutton I wrote: Private Sub CommandButton5_Click() Dim thing As Worksheet For Each thing In Worksheets thing.Unprotect Next thing End Sub But what is the syntax to unprotect and protect a workbook? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unprotect workbook
activeworkbook.protect
activeworkbook.unprotect -- Regards Frank Kabel Frankfurt, Germany "Jean-Paul De Winter" schrieb im Newsbeitrag ... Hi, To unprotect a sheet with a click on a pushbutton I wrote: Private Sub CommandButton5_Click() Dim thing As Worksheet For Each thing In Worksheets thing.Unprotect Next thing End Sub But what is the syntax to unprotect and protect a workbook? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unprotect workbook
BTW, an easy way to both code and discover coding for operations that can be done with menu items or mouse controls is to just start recording a macro, perform the task you want with the mouse, stop recording and cut what you want out of what you recorded. "Jean-Paul De Winter" wrote in message ... Hi, To unprotect a sheet with a click on a pushbutton I wrote: Private Sub CommandButton5_Click() Dim thing As Worksheet For Each thing In Worksheets thing.Unprotect Next thing End Sub But what is the syntax to unprotect and protect a workbook? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unprotect workbook
Hi
I the code of a pushbutton I wrote: Private Sub CommandButton5_Click() ActiveWorkbook.Unprotect Dim thing As Worksheet For Each thing In Worksheets thing.Unprotect Next thing End Sub This seems to work but, when protected I still can choose a cell (but I can not change anything... that's OK) What to write so I can't even choose the cell?? Thanks JP "Frank Kabel" schreef in bericht ... activeworkbook.protect activeworkbook.unprotect -- Regards Frank Kabel Frankfurt, Germany "Jean-Paul De Winter" schrieb im Newsbeitrag ... Hi, To unprotect a sheet with a click on a pushbutton I wrote: Private Sub CommandButton5_Click() Dim thing As Worksheet For Each thing In Worksheets thing.Unprotect Next thing End Sub But what is the syntax to unprotect and protect a workbook? Thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unprotect workbook
Hi
this is an option of the protect worksheets dialog. To get the syntax for this you may record a macro while manually protecting a sheet -- Regards Frank Kabel Frankfurt, Germany "Jean-Paul De Winter" schrieb im Newsbeitrag ... Hi I the code of a pushbutton I wrote: Private Sub CommandButton5_Click() ActiveWorkbook.Unprotect Dim thing As Worksheet For Each thing In Worksheets thing.Unprotect Next thing End Sub This seems to work but, when protected I still can choose a cell (but I can not change anything... that's OK) What to write so I can't even choose the cell?? Thanks JP "Frank Kabel" schreef in bericht ... activeworkbook.protect activeworkbook.unprotect -- Regards Frank Kabel Frankfurt, Germany "Jean-Paul De Winter" schrieb im Newsbeitrag ... Hi, To unprotect a sheet with a click on a pushbutton I wrote: Private Sub CommandButton5_Click() Dim thing As Worksheet For Each thing In Worksheets thing.Unprotect Next thing End Sub But what is the syntax to unprotect and protect a workbook? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unprotect workbook | Excel Discussion (Misc queries) | |||
Unprotect workbook | Excel Discussion (Misc queries) | |||
unprotect workbook | Excel Discussion (Misc queries) | |||
Unprotect Workbook | Excel Discussion (Misc queries) | |||
Unprotect a Workbook | Excel Programming |