So, I want to be able to click a button that will open a window and let me Navigate to a location where pictures are located, then when I select the picture I want, I want it to insert it in to an excel worksheet and resize it at the same time. It does not have to be a certain cell that it puts it in. The locations will always be differenct and so will file names so i am trying to make it "variable" so to speak. or "Dynamic", what every the proper word is.
I have the following code but clearly i am not there yet.
Can any one help me out here?
Sub InsertPictAndResizeIt()
'
' InsertPictAndResizeIt Macro
Dim MyPict As String
Dim PictFolderPath As Variant
PictFolderPath = "c:\Users"
MyPict = Application.GetOpenFilename
If MyPict = "False" Then Exit Sub
'MyPict.Show
'
Sheet5.Pictures.Insert ("MyPict" & "PictFolderPath")
'ActiveSheet.Pictures.Insert.MyPict '( _
'"C:\Users\jlang\Desktop\Reddog VIP\Pictures\2007\20171214_131746.jpg").Select
Selection.ShapeRange.IncrementLeft -706.5
Selection.ShapeRange.IncrementTop -175.5
Application.CommandBars("Format Object").Visible = False
Selection.ShapeRange.Height = 194.4
End Sub
I have the following code but clearly i am not there yet.
Can any one help me out here?
Sub InsertPictAndResizeIt()
'
' InsertPictAndResizeIt Macro
Dim MyPict As String
Dim PictFolderPath As Variant
PictFolderPath = "c:\Users"
MyPict = Application.GetOpenFilename
If MyPict = "False" Then Exit Sub
'MyPict.Show
'
Sheet5.Pictures.Insert ("MyPict" & "PictFolderPath")
'ActiveSheet.Pictures.Insert.MyPict '( _
'"C:\Users\jlang\Desktop\Reddog VIP\Pictures\2007\20171214_131746.jpg").Select
Selection.ShapeRange.IncrementLeft -706.5
Selection.ShapeRange.IncrementTop -175.5
Application.CommandBars("Format Object").Visible = False
Selection.ShapeRange.Height = 194.4
End Sub