Foto anordnung in Excel 2007 funktioniert nicht me
STefan
Habe mal mit viel mühe und dank eurer Unterstüzung vor Jahren ein automatisches Einfügeprogramm
für Fotos geschrieben.
In meiner Excel version 2007 richtet das Programm die Fotos nicht mehr wie gewüscht aus, dh in die Zelle in dem der Foto link steht. Jetzt packt das Programm alle Fotos aufeinander
Leider habe ich keine Ahnung wie sich VBA mit Excel 2007 geändert hat.
Wäre super wenn mir hier jemand helfen könnte
Vielen Dank schon einmal
Sub Photosuche_in_A_Spalte()
Range("a2").Select
ActiveCell.FormulaR1C1 = "=""Z:\Produktfotos\""&RC[1]&"".jpg"""
Range("a2").Select
Selection.AutoFill Destination:=Range("a2:a100"), Type:=xlFillDefault
Range("a2:a100").Select
Range("B7").Select
Dim rng As Range
Dim lngR As Long
Dim i As Integer
Dim wks As Worksheet
Dim Bild As Shape
Set wks = ActiveSheet
On Error Resume Next
Application.ScreenUpdating = False
' blnChk = True
If blnChk = False Then
lngR = wks.Range("a10000").End(xlUp).Row
blnChk = True
For Each rng In wks.Range("a2:a" & lngR)
If rng "" And rng.Rows.Hidden = False Then
rng.Offset(0, 0).Select
wks.Pictures.Insert(rng.Value).Name = "Bild_" & intC
Set Bild = wks.Shapes("Bild_" & intC)
rng.RowHeight = 90
Bild.ShapeRange.LockAspectRatio = msoTrue
Bild.Height = rng.RowHeight
intC = intC + 1
End If
Next
Else
For i = 0 To intC - 1
wks.Pictures("Bild_" & i).Delete
Next
wks.Range("A:A").Rows.AutoFit
blnChk = False
intC = 0
End If
Columns("a:a").Select
Selection.ClearContents
Application.ScreenUpdating = True
Columns("D:D").ColumnWidth = 25.86
Range("a1").Select
End Sub