Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Allow comments in protected sheet using VB

I am using VB to protect a sheet in an excel workbook. Because I use
grouping/outlining within the sheet I have to use VB to protect the sheet.
However, when I protect the sheet I cannot add comments to the unlocked
cells. If I was not using VB to protect I would "allow users to edit
objects" when protecting the sheet and then comments could be added. How can
I fix this in VB?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Allow comments in protected sheet using VB

Include that option (to edit objects) in the code that protects the worksheet.

I'm not sure I understand why protecting the sheet in code would make a
difference.

CraigKer wrote:

I am using VB to protect a sheet in an excel workbook. Because I use
grouping/outlining within the sheet I have to use VB to protect the sheet.
However, when I protect the sheet I cannot add comments to the unlocked
cells. If I was not using VB to protect I would "allow users to edit
objects" when protecting the sheet and then comments could be added. How can
I fix this in VB?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Allow comments in protected sheet using VB

I don't know what that option to (to edit objects) is? It's not an option
for the protect method that I am using. My code to protect the sheet is as
follows:

With Worksheets("Sheet1")
.Protect Password:="XXXXXX", userinterfaceonly:=True,
AllowFormattingCells:=True, AllowFormattingColumns:=True,
AllowInsertingRows:=True, AllowSorting:=True,
AllowFormattingRows:=True
.enableoutlining = True
.EnableAutoFilter = True
If FilterMode Then
.ShowAllData
End If
.EnableSelection = xlNoRestrictions
End With



"Dave Peterson" wrote:

Include that option (to edit objects) in the code that protects the worksheet.

I'm not sure I understand why protecting the sheet in code would make a
difference.

CraigKer wrote:

I am using VB to protect a sheet in an excel workbook. Because I use
grouping/outlining within the sheet I have to use VB to protect the sheet.
However, when I protect the sheet I cannot add comments to the unlocked
cells. If I was not using VB to protect I would "allow users to edit
objects" when protecting the sheet and then comments could be added. How can
I fix this in VB?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Allow comments in protected sheet using VB

Record a macro when you do it twice--once with the option chosen and once
exactly the same, but with that option unchecked. Then you can look at each and
see the difference.

(In a hushed voice--look for drawingobjects)




CraigKer wrote:

I don't know what that option to (to edit objects) is? It's not an option
for the protect method that I am using. My code to protect the sheet is as
follows:

With Worksheets("Sheet1")
.Protect Password:="XXXXXX", userinterfaceonly:=True,
AllowFormattingCells:=True, AllowFormattingColumns:=True,
AllowInsertingRows:=True, AllowSorting:=True,
AllowFormattingRows:=True
.enableoutlining = True
.EnableAutoFilter = True
If FilterMode Then
.ShowAllData
End If
.EnableSelection = xlNoRestrictions
End With

"Dave Peterson" wrote:

Include that option (to edit objects) in the code that protects the worksheet.

I'm not sure I understand why protecting the sheet in code would make a
difference.

CraigKer wrote:

I am using VB to protect a sheet in an excel workbook. Because I use
grouping/outlining within the sheet I have to use VB to protect the sheet.
However, when I protect the sheet I cannot add comments to the unlocked
cells. If I was not using VB to protect I would "allow users to edit
objects" when protecting the sheet and then comments could be added. How can
I fix this in VB?


--

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
INSERT COMMENTS INTO PROTECTED SHEET Chris Excel Discussion (Misc queries) 3 July 14th 08 01:48 PM
How do I add comments to a protected sheet? PNI-dz Excel Worksheet Functions 1 March 18th 08 04:07 PM
Show Comments on Protected Sheet Sarah Excel Discussion (Misc queries) 4 March 23rd 07 08:03 AM
adding comments to protected sheet DMT New Users to Excel 1 October 10th 06 01:47 AM
Inserting Comments into Protected sheet TJAC Excel Discussion (Misc queries) 1 March 20th 06 06:32 PM


All times are GMT +1. The time now is 05:43 AM.

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

About Us

"It's about Microsoft Excel"