Macro bei éffnung der Datei ausführen
14.02.2007 08:49:00
matthias
ich hab folgendes für den blinkenden text herausgesucht. Wie kann ich es machen dass das Macro beim öffnen der datei automatisch ausgeführt wird?
Tabelle:
Private Sub Worksheet_Activate()
Call blink
End Sub
Private Sub Worksheet_Deactivate()
Application.OnTime start, "blink", , False
End Sub
Modul:
Option Explicit
Public start As Date
Sub blink()
If Sheets(1).Cells(1, 1).Font.ColorIndex = xlColorIndexAutomatic Then
Sheets(1).Cells(1, 1).Font.ColorIndex = 2 ' bemerkung
Else: Sheets(1).Cells(1, 1).Font.ColorIndex = xlColorIndexAutomatic
End If
start = Now + TimeValue("00:00:01")
Application.OnTime start, "blink"
End Sub