Makro auf ein Blatt beschränken
30.05.2023 20:38:03
Christian
Hallo,
ich muss leider doch mal eine blöde Frage stellen.
Habe dieses kleine Makro hier.
Private Sub Worksheet_Change(ByVal Target As Range)
With Selection
.Font.Bold = False
.Font.Name = "Calibri"
.Font.Size = 11
.Font.ColorIndex = xlAutomatic
.Hyperlinks.Delete
.HorizontalAlignment = xlCenter
.Font.Italic = True
End With
Application.EnableEvents = True
End Sub
Was kann ich tun, damit das ganze nur passiert, wenn sich die Auswahl im Blatt namens Ergebnis befindet?
Habe es mit
Private Sub Worksheet_Change(ByVal Target As Range)
With Worksheets("Ergebnis")
With Selection
.Font.Bold = False
.Font.Name = "Calibri"
.Font.Size = 11
.Font.ColorIndex = xlAutomatic
.Hyperlinks.Delete
.HorizontalAlignment = xlCenter
.Font.Italic = True
End With
End With
Application.EnableEvents = True
End Sub
versucht aber das brachte keinen Erfolg. Das Makro befindet sich bereits im Code des Blatts Ergebnis.
Danke
Christian