View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
diaare diaare is offline
external usenet poster
 
Posts: 50
Default Sheet protection and "Group and Outline"

I have the following code in my workbook. It allos the user to utilize the
outline and grouping, but it will not allow them to add and delete rows.

Private Sub Workbook_Open()
With Worksheets("vendorcommodities_detail")
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True, AllowInsertingColumns:=True, _
AllowInsertingRows:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True
.Protect Password:="add", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

Since I am new to VBA, I am having trouble locating why it wont work.

Thanks
DIane