please do guide me where I am mistaking in the code.
Thanks in advance
Dim oPic As Picture
Dim sFilename As String
'Prompt user for file
sFilename = Application.GetOpenFilename( _
filefilter:="Pictures (*.jpg), *.jpg", _
Title:="Insert Picture", _
ButtonText:="Insert")
'If the user cancels, exit the sub
If sFilename = "False" Then Exit Sub
'Insert the picture in the active sheet
Set oPic = ActiveSheet.Pictures.Insert(sFilename)
'Set the properties
With oPic
.ShapeRange.LockAspectRatio = msoTrue
.Left = Range("B2").Left
.Top = Range("B2").Top
.Width = 75 'or Range("B2:C2").Width
End With
Bookmarks