Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all,
I have a workbook that is used for estimating, Which i have protected by a password. I'm trying to allow the user to be able to insert comments and am unable to do so when it is protected. I am currently using this macro: Private Sub Workbook_Open() With Worksheets("Building 1") ..Protect Password:="12345", userinterfaceonly:=True ..EnableOutlining = True End With To allow the user to use the outline function; the +/- feature. I know you should be able to go to tool-protection-- and check edit objects to allow the user to insert comments, it works while i have the workbook open, but as soon as i close it an open the file again, i can no longer insert comments. Does anyone have a macro that will allow a user to inser a comment cells that are only unlocked? Thank you, Sean |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you do the protection manually, you'll see an option for "edit Objects".
You can add a parm to your .protect line: DrawingObjects:=False to do it in code. Sean wrote: Hi all, I have a workbook that is used for estimating, Which i have protected by a password. I'm trying to allow the user to be able to insert comments and am unable to do so when it is protected. I am currently using this macro: Private Sub Workbook_Open() With Worksheets("Building 1") .Protect Password:="12345", userinterfaceonly:=True .EnableOutlining = True End With To allow the user to use the outline function; the +/- feature. I know you should be able to go to tool-protection-- and check edit objects to allow the user to insert comments, it works while i have the workbook open, but as soon as i close it an open the file again, i can no longer insert comments. Does anyone have a macro that will allow a user to inser a comment cells that are only unlocked? Thank you, Sean -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
But how come I add
DrawingObjects = False to my macro, it still doesn't work for text box protection. It works when I manual uncheck "objects" in protection dialog. I have so many similar worksheets to be protected, I hope someone can give me a hint to do them automatically! Belowed is the macro I use. Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count DrawingObjects = False Sheets(n).Protect password:="123" Next n Application.ScreenUpdating = True End Sub "Dave Peterson" wrote: If you do the protection manually, you'll see an option for "edit Objects". You can add a parm to your .protect line: DrawingObjects:=False to do it in code. Sean wrote: Hi all, I have a workbook that is used for estimating, Which i have protected by a password. I'm trying to allow the user to be able to insert comments and am unable to do so when it is protected. I am currently using this macro: Private Sub Workbook_Open() With Worksheets("Building 1") .Protect Password:="12345", userinterfaceonly:=True .EnableOutlining = True End With To allow the user to use the outline function; the +/- feature. I know you should be able to go to tool-protection-- and check edit objects to allow the user to insert comments, it works while i have the workbook open, but as soon as i close it an open the file again, i can no longer insert comments. Does anyone have a macro that will allow a user to inser a comment cells that are only unlocked? Thank you, Sean -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Option Explicit
Sub ProtectAllSheets() Application.ScreenUpdating = False Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets wks.Protect Password:="123", DrawingObjects:=False Next wks Application.ScreenUpdating = True End Sub smart.daisy wrote: But how come I add DrawingObjects = False to my macro, it still doesn't work for text box protection. It works when I manual uncheck "objects" in protection dialog. I have so many similar worksheets to be protected, I hope someone can give me a hint to do them automatically! Belowed is the macro I use. Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count DrawingObjects = False Sheets(n).Protect password:="123" Next n Application.ScreenUpdating = True End Sub "Dave Peterson" wrote: If you do the protection manually, you'll see an option for "edit Objects". You can add a parm to your .protect line: DrawingObjects:=False to do it in code. Sean wrote: Hi all, I have a workbook that is used for estimating, Which i have protected by a password. I'm trying to allow the user to be able to insert comments and am unable to do so when it is protected. I am currently using this macro: Private Sub Workbook_Open() With Worksheets("Building 1") .Protect Password:="12345", userinterfaceonly:=True .EnableOutlining = True End With To allow the user to use the outline function; the +/- feature. I know you should be able to go to tool-protection-- and check edit objects to allow the user to insert comments, it works while i have the workbook open, but as soon as i close it an open the file again, i can no longer insert comments. Does anyone have a macro that will allow a user to inser a comment cells that are only unlocked? Thank you, Sean -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Dave.
I get several good hints from your previous posts about EXCEL. You are a very kind person. Thanks a lot! "Dave Peterson" wrote: Option Explicit Sub ProtectAllSheets() Application.ScreenUpdating = False Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets wks.Protect Password:="123", DrawingObjects:=False Next wks Application.ScreenUpdating = True End Sub smart.daisy wrote: But how come I add DrawingObjects = False to my macro, it still doesn't work for text box protection. It works when I manual uncheck "objects" in protection dialog. I have so many similar worksheets to be protected, I hope someone can give me a hint to do them automatically! Belowed is the macro I use. Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count DrawingObjects = False Sheets(n).Protect password:="123" Next n Application.ScreenUpdating = True End Sub "Dave Peterson" wrote: If you do the protection manually, you'll see an option for "edit Objects". You can add a parm to your .protect line: DrawingObjects:=False to do it in code. Sean wrote: Hi all, I have a workbook that is used for estimating, Which i have protected by a password. I'm trying to allow the user to be able to insert comments and am unable to do so when it is protected. I am currently using this macro: Private Sub Workbook_Open() With Worksheets("Building 1") .Protect Password:="12345", userinterfaceonly:=True .EnableOutlining = True End With To allow the user to use the outline function; the +/- feature. I know you should be able to go to tool-protection-- and check edit objects to allow the user to insert comments, it works while i have the workbook open, but as soon as i close it an open the file again, i can no longer insert comments. Does anyone have a macro that will allow a user to inser a comment cells that are only unlocked? Thank you, Sean -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Please disregard my question. I figure it out. Below is new macro and it
works!! Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count DrawingObjects = False Sheets(n).Protect password:="123", DrawingObjects:=False, Contents:=True, Scenarios:=True Next n Application.ScreenUpdating = True End Sub "smart.daisy" wrote: But how come I add DrawingObjects = False to my macro, it still doesn't work for text box protection. It works when I manual uncheck "objects" in protection dialog. I have so many similar worksheets to be protected, I hope someone can give me a hint to do them automatically! Belowed is the macro I use. Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count DrawingObjects = False Sheets(n).Protect password:="123" Next n Application.ScreenUpdating = True End Sub "Dave Peterson" wrote: If you do the protection manually, you'll see an option for "edit Objects". You can add a parm to your .protect line: DrawingObjects:=False to do it in code. Sean wrote: Hi all, I have a workbook that is used for estimating, Which i have protected by a password. I'm trying to allow the user to be able to insert comments and am unable to do so when it is protected. I am currently using this macro: Private Sub Workbook_Open() With Worksheets("Building 1") .Protect Password:="12345", userinterfaceonly:=True .EnableOutlining = True End With To allow the user to use the outline function; the +/- feature. I know you should be able to go to tool-protection-- and check edit objects to allow the user to insert comments, it works while i have the workbook open, but as soon as i close it an open the file again, i can no longer insert comments. Does anyone have a macro that will allow a user to inser a comment cells that are only unlocked? Thank you, Sean -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you used this version, then you can delete this line:
DrawingObjects = False not the "DrawingObjects:=False", though. smart.daisy wrote: Please disregard my question. I figure it out. Below is new macro and it works!! Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count DrawingObjects = False Sheets(n).Protect password:="123", DrawingObjects:=False, Contents:=True, Scenarios:=True Next n Application.ScreenUpdating = True End Sub "smart.daisy" wrote: But how come I add DrawingObjects = False to my macro, it still doesn't work for text box protection. It works when I manual uncheck "objects" in protection dialog. I have so many similar worksheets to be protected, I hope someone can give me a hint to do them automatically! Belowed is the macro I use. Sub ProtectAllSheets() Application.ScreenUpdating = False Dim n As Single For n = 1 To Sheets.Count DrawingObjects = False Sheets(n).Protect password:="123" Next n Application.ScreenUpdating = True End Sub "Dave Peterson" wrote: If you do the protection manually, you'll see an option for "edit Objects". You can add a parm to your .protect line: DrawingObjects:=False to do it in code. Sean wrote: Hi all, I have a workbook that is used for estimating, Which i have protected by a password. I'm trying to allow the user to be able to insert comments and am unable to do so when it is protected. I am currently using this macro: Private Sub Workbook_Open() With Worksheets("Building 1") .Protect Password:="12345", userinterfaceonly:=True .EnableOutlining = True End With To allow the user to use the outline function; the +/- feature. I know you should be able to go to tool-protection-- and check edit objects to allow the user to insert comments, it works while i have the workbook open, but as soon as i close it an open the file again, i can no longer insert comments. Does anyone have a macro that will allow a user to inser a comment cells that are only unlocked? Thank you, Sean -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run macros on protected worksheet | Excel Worksheet Functions | |||
Run macros on protected worksheet | Excel Worksheet Functions | |||
Copying a worksheet witrh protected cells to a new worksheet | Excel Worksheet Functions | |||
Enter comments in a protected Excel worksheet | Excel Worksheet Functions |