Hallo zusammen!
Ich öffne aus Access heraus via VBA eine Exceldatei, das klappt auch prima:
Set exApp = CreateObject(„Excel.Application“)
exApp.workbooks.Open Filename:=„c:“ & Akt_Datum & " Export.xls"
exApp.Visible = True
allerdings, schaffe ich es nicht, über „bedingte Formatierung“ die Zeilen abwechselnd einzufärben zu lassen. In Excel (mit VBA) klappts, wenn ich das über Access-VBA versuche, bekomme ich immer eine Fehlermeldung. Hier der Fehlerhafte Code:
With exApp
.cells(1, 1).Select
.Selection.CurrentRegion.Select
.Selection.FormatConditions.Delete
.Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
„=REST(TEILERGEBNIS(3;$A$1:blush:A1);2)=0“
.Selection.FormatConditions(1).Interior.ColorIndex = 19
.cells(1, 1).Select
.Sheets(„tab_Export“).Name = Sheet
End With
End Function
Hat jemand einen Tipp für mich oder einen anderen Lösungsansatz?
Danke & viele Grüße