Hi,
I have protected a excel workbook that needs to import images into a worksheet of this protected workbook to print in a report.
After I have selected the image I want to import into the sheet I get the following errors:
I have a button that runs the following code to insert a image:
Sub ImageInsertion()
Dim x As Long
Dim Y As Long
Dim Z As Long
Dim AA As Long
Dim FullFileName As String
x = Selection.Height
Y = Selection.Width
Z = Selection.Top
AA = Selection.Left
FullFileName = Application.GetOpenFilename()
Select Case FullFileName
Case Is = False
Exit Sub
End Select
ActiveSheet.Pictures.Insert(FullFileName).Select
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = x
Selection.ShapeRange.Width = Y
Selection.ShapeRange.Top = Z
Selection.ShapeRange.Left = AA
End Sub`