Creating Image that is Unlocked in a Protected Sheet

dariuzthepole

Board Regular
Joined
Jul 23, 2008
Messages
111
Hi All,

I have a macro in a protected sheet that pastes an image into it. I want that image to be unlocked so it can be selected and copied. I know you can right-click and unlock the image after it has been created, but this cannot be done when the sheet is locked.

My code is below and the .Locked line is wrong. Any ideas on the correct syntax? Thanks in advance for your help.

Code:
Dim sh As Object


    Range("H7:S59").Select
    Selection.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
    Range("V11").Select
    ActiveSheet.Paste
     
    With ActiveWindow.Selection.ShapeRange
    .LockAspectRatio = True
    .Top = Range("V11").Top
    .Left = Range("V11").Left
    '.Height = 183.064
    .Width = 105.965
    .Visible = True
    .Locked = False
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,223,888
Messages
6,175,213
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top