Hallihallo,
ich habe folgendes Makro, welches wunderbar läuft und das Bild direkt perfekt in die Zelle einfügt. Allerdings wird das Bild nur Verlinkunkt und nicht gespeichert.
Könnte man das Makro dahingehend anpassen, dass das eingefügte Bild auch direkt im schwer gespeichert wird ?
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 = msoFalse
.Height = ActiveCell.Height
.Width = ActiveCell.Width
.Top = ActiveCell.Top
.Left = ActiveCell.Left
.Placement = xlMoveAndSize
End With
Set pic = Nothing
End Sub
ich habe folgendes Makro, welches wunderbar läuft und das Bild direkt perfekt in die Zelle einfügt. Allerdings wird das Bild nur Verlinkunkt und nicht gespeichert.
Könnte man das Makro dahingehend anpassen, dass das eingefügte Bild auch direkt im schwer gespeichert wird ?
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 = msoFalse
.Height = ActiveCell.Height
.Width = ActiveCell.Width
.Top = ActiveCell.Top
.Left = ActiveCell.Left
.Placement = xlMoveAndSize
End With
Set pic = Nothing
End Sub