AW: Grafik suchen und einfügen
14.05.2005 18:06:46
Reinhard
Hallo Enrico,
ein Ansatz:
https://www.herber.de/bbs/user/22628.xls
In tabelle2 stehen in a2:a5 die 4 Artikelnummern, die ersten 3 funktionieren bestens, die letzte nicht, 1004 fehler.
die Combobox1 hat listFillRange tabelle2!a2:a5 und linkedCell tabelle2!E1
Gruß
Reinhard
Private Sub ComboBox1_Change()
Application.ScreenUpdating = False
On Error GoTo Fehler
Set ws1 = Worksheets("Tabelle1")
Set ws2 = Worksheets("Tabelle2")
Bildadr = Application.WorksheetFunction.VLookup(ws2.Range("E1"), ws2.Range("A2:D4"), 4, 0)
With ws1
.Shapes("Artbild").Delete
.Pictures.Insert(Bildadr).Name = "Artbild"
Shapes("Artbild").Top = .Range("G1").Top
Shapes("Artbild").Left = .Range("G1").Left
Shapes("Artbild").Width = 100
Shapes("Artbild").Height = 100
.Range("e3") = Application.WorksheetFunction.VLookup(ws2.Range("E1"), ws2.Range("A2:D4"), 2, 0)
.Range("f3") = Application.WorksheetFunction.VLookup(ws2.Range("E1"), ws2.Range("A2:D4"), 3, 0)
End With
Fehler:
Application.ScreenUpdating = True
End Sub