Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Adding comments into a protected worksheet

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding comments into a protected worksheet

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Adding comments into a protected worksheet

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding comments into a protected worksheet

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Adding comments into a protected worksheet

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



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Adding comments into a protected worksheet

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

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding comments into a protected worksheet

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run macros on protected worksheet Lisa D'K Excel Worksheet Functions 0 February 4th 06 08:06 PM
Run macros on protected worksheet paul Excel Worksheet Functions 0 February 4th 06 11:53 AM
Copying a worksheet witrh protected cells to a new worksheet John Excel Worksheet Functions 2 February 1st 06 02:19 PM
Enter comments in a protected Excel worksheet SUE D Excel Worksheet Functions 1 September 21st 05 04:57 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"