Help With Macro Insert Pictures

redd

Board Regular
Joined
Jan 16, 2005
Messages
109
Sub PutPicInCell()
'
Dim MyCell As Range
Dim vFile As Variant

Set MyCell = ActiveCell
vFile = Application.GetOpenFilename("All Files (*.*),*.*")
If vFile = "False" Then Exit Sub

ActiveSheet.Pictures.Insert(vFile).Select
Selection.Top = MyCell.Top
Selection.Left = MyCell.Left
Selection.Width = MyCell.Width
Selection.Height = MyCell.Height


End Sub
I would like to open up folder"My Pictures",sub folder "Boats"instead of "All Files
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,057
Office Version
  1. 365
Platform
  1. Windows
What exactly do you mean?

Is 'Boats' a subfolder of 'My Pictures'?
 

Watch MrExcel Video

Forum statistics

Threads
1,118,455
Messages
5,572,223
Members
412,448
Latest member
ManuW
Top