Wie kiege ich Excel dazu gut 1400 Grafiken per VBA einzufügen. Mein Skript läuft nicht richtig.
Sub BMP_einfuegen()
Application.ScreenUpdating = False
Dim code, pfad As String
Dim i, dheight As Integer
Range("A:A").Activate
On Error Resume Next
Dim Zelle
i = 0
For Each Zelle In Range("A:A")
i = i + 1
code = Zelle.Value
code = code & ".bmp"
code = LCase(code)
Zelle.Offset(0, 3).Activate
pfad = "D:\CARIS_ZV\Zeichnungen\bitmaps060821\" & code
ActiveSheet.Pictures.Insert (pfad)
' If ActiveSheet.Pictures(i).Height > 24# Then
' dheight = ActiveSheet.Pictures(i).Height
' ActiveCell.Rows.RowHeight = dheight
' Else
' ActiveCell.Rows.RowHeight = 24#
' End If
ActiveSheet.Pictures(i).Left = ActiveCell.Left + (ActiveCell.Width - ActiveSheet.Pictures(i).Width) / 2
If ActiveCell.Offset(1, -3) = "" Then Exit For
ActiveCell.Offset(1, -3).Activate
Next Zelle
Application.ScreenUpdating = True
End Sub