as soon im select picture it give me error
Run-time error 1004
The specified value is out of range.
thank for any help...
Run-time error 1004
The specified value is out of range.
thank for any help...
Code:
Private Sub Worksheet_SelectionChange(ByVal target As Range)If target.Address = "$F$5" Or target.Address = "$F$6" Or target.Address = "$F$7" Or target.Address = "$F$8" Or target.Address = "$F$9" Or target.Address = "$F$10" Or target.Address = "$G$5" Or target.Address = "$G$6" Or target.Address = "$G$7" Or target.Address = "$G$8" Or target.Address = "$G$9" Or target.Address = "$G$10" Then
PicLocation = Application.GetOpenFilename("Image Files (*.jpg),*.jpg", , "Select Image File", , "False")
ActiveSheet.Shapes.AddPicture(PicLocation, False, True, 10, 10, 10, 10).Select
With Selection.ShapeRange
' Align picture to top left of range
.LockAspectRatio = msoFalse
.Height = ActiveCell.Height
.Width = ActiveCell.Width
.Top = ActiveCell.Top
.Left = ActiveCell.Left
End With
End If
End Sub