Hallo,
da gibt's mehrere Mögl.:
'...
Dim objPicture As Picture '// oben deklar....////
'...
On Error Resume Next
'Bild einfügen
Set objPicture = Tabelle1.Pictures.Insert(Tabelle1.Cells(i, 2).Value)
On Error GoTo 0
If objPicture Is Nothing Then
Tabelle1.Cells(i, 1).Value = "X"
Else
With objPicture
.Height = 65
.Top = Tabelle1.Cells(i, 1).Top
.Left = Tabelle1.Cells(i, 1).Left
.Placement = xlMoveAndSize
End With
Set objPicture = Nothing
End If
'...
...oder...
'...
If Dir$(Tabelle1.Cells(i, 2).Value) = "" Then
Tabelle1.Cells(i, 1).Value = "X"
Else 'Bild einfügen
With Tabelle1.Pictures.Insert(Tabelle1.Cells(i, 2).Value)
.Height = 65
.Top = Tabelle1.Cells(i, 1).Top
.Left = Tabelle1.Cells(i, 1).Left
.Placement = xlMoveAndSize
End With
End If
'...
...und das hier geht immer besser so, löscht aber keine Bilder, sondern nur Zell-Inhalte:
'**********************************************
'Bilder aus einem bestimmten Bereich löschen
Tabelle1.Range("A4:A1000").Select
Selection.ClearContents
'**********************************************
'**********************************************
'Bilder aus einem bestimmten Bereich löschen
Tabelle1.Range("A4:A1000").ClearContents
'**********************************************
Gruß,
|