Sumeluar
Active Member
- Joined
- Jun 21, 2006
- Messages
- 274
- Office Version
- 365
- 2016
- 2010
- Platform
- Windows
- MacOS
- Mobile
Good day - I do not recall where I got the below macro from, can I get some assistance to have it modified to do the following:
- Allow to choose .gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif" (already doing so)
- Allow to customize a name to be visible at the bottom of the image
- Change the image to show it as an icon instead as if it was an embeded object
Sub InsertPicture()
Dim sPicture As String, pic As Picture
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
, "Select Picture to Import")
If sPicture = "False" Then Exit Sub
Set pic = ActiveSheet.Pictures.Insert(sPicture)
With pic
.ShapeRange.LockAspectRatio = True
.Height = ActiveCell.Height
.Top = ActiveCell.Top
.Placement = xlMoveAndSize
End With
Set pic = Nothing
End Sub
Any assistance would be greatly appreciated.
Regards, Sumeluar
- Allow to choose .gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif" (already doing so)
- Allow to customize a name to be visible at the bottom of the image
- Change the image to show it as an icon instead as if it was an embeded object
Sub InsertPicture()
Dim sPicture As String, pic As Picture
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
, "Select Picture to Import")
If sPicture = "False" Then Exit Sub
Set pic = ActiveSheet.Pictures.Insert(sPicture)
With pic
.ShapeRange.LockAspectRatio = True
.Height = ActiveCell.Height
.Top = ActiveCell.Top
.Placement = xlMoveAndSize
End With
Set pic = Nothing
End Sub
Any assistance would be greatly appreciated.
Regards, Sumeluar