A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
....I don't want a default path to be set though.....
Hi,
try, 'GetOpen' method to select a picture...
expected result (picture) in active sheet, in cells C3:D3
Sub GetOpen_Pic_01()
'May 20, 2014
On Error GoTo errh
Dim ws As Worksheet
Set ws = ActiveSheet
Dim v As Variant
Dim r As Range
Set r = ws.Range("C3:D3") '<<< target area
'delete old pic. from target
For Each p In ws.Pictures
If Not Intersect(p.TopLeftCell, r) Is Nothing Then p.Delete
Next
v = Application.GetOpenFilename(FileFilter:="images (*.bmg;*.gif;*.jpg;*.jpeg;*.png;*.tif;*.yuv),*.bmg;*.gif;*.jpg;*.jpeg;*.png;*.tif;*.yuv", _
Title:="select an image", MultiSelect:=False)
With ws.Pictures.Insert(v)
.ShapeRange.LockAspectRatio = msoFalse
.Height = r.Height
.Width = r.Width
.Top = r.Top
.Left = r.Left
.Placement = xlMoveAndSize
End With
errh:
ActiveWorkbook.Save
End Sub