in A1 ist eine bedingte Formatierung hinterlegt:
Formel ist:
=WOCHENTAG(A1;2)>5
Jetzt möchte ich diese Formel per VBA auslesen. Allerdings scheint es dabei notwendig zu sein, die Zelle A1 auch zu selektieren, da es sonst aufgrund der relativen Zellengabe in der bedingten Formatierung auch zu nem relativen Ergebnis kommt...Warum nur?
Sub test()
[a1].Select
MsgBox [a1].FormatConditions(1).Formula1 'ergibt =WOCHENTAG(A1;2)>5
[z100].Select
MsgBox [a1].FormatConditions(1).Formula1 'ergibt =WOCHENTAG(Z100;2)>5, obwohl ich [a1] voranstelle
End Sub
Also spielt die Referenz für die FormatConditions (hier: [a1]) dabei wohl überhaupt keine Rolle?!? Kann mir das jemand kurz erläutern?
Grüße Boris