VBA .select ohne "Springen"?
25.01.2021 10:18:12
Andrea
ich habe zur Formatierung eines Bereichs folgendes Makro erstellt:
Sheets("RA-Einn.").Select
Range("E14:E1000").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$G$3=""Nein"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Das Makro wird beim Öffnen der Datei ausgeführt und funktioniert. Mir gefällt nur nicht, dass beim Durchlaufen des Makros Excel tatsächlich zu o. g. Sheet und Range springt und dann wieder zurück zum Ausgangssheet.Ich weiß, dass man select oft gar nicht braucht. Hier ist es mir aber nicht gelungen, es zu umgehen.
Hat jemand einen Tipp für mich?
Vielen Dank und schöne Grüße
Andrea