Quantcast
Channel: Microsoft Community - Super Fresh
Viewing all articles
Browse latest Browse all 1237856

Need help protecting an excel sheet including the objects but allowing the insertion of pictures in certain cells via VBA code

$
0
0

Need help protecting an excel sheet including the objects that are on the page but allowing the insertion of pictures in certain cells via VBA code or any way possible. When I protect then sheet and check the box to protect objects it locks the ability to insert pictures. This sheet is a picture page of a report and employees need to be able to insert pictures into it but not be able to alter any of the other objects in the sheet. I entered the VBA code below but it didn't work. Please help.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
    On Error Resume Next
    With Worksheets("worksheet")
        .EnableOutlining = True
        .EnableAutoFilter = True
        .Protect Password:="password", _
        Contents:=True, DrawingObjects:=False, UserInterfaceOnly:=True, _
        AllowFormattingCells:=True
    End With
    Application.ScreenUpdating = True
End Sub


Viewing all articles
Browse latest Browse all 1237856

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>