Hi, ich verstehe es leider nicht, habe was umgeschrieben und kommt immer noch Fehler. Kann mir jemand sagen wo und was ich umschreiben muss?
Danke schon mal
Sub TabellenblattWechseln()
Dim SartWechsel As Integer
Dim Blattname As String
Dim Dateiname As String
Dim Pfad As String
Dim Dateiname_mit_Pfad As String
Dim Zeit As String
Dim Bezug As String
Dim Tabellenblatt As String
Static Zaehler_Wechsel As Integer
If Zaehler_Wechsel < 1 Then
Zeit = "00:00:05"
Zaehler_Wechsel = Zaehler_Wechsel + 1: If Zaehler_Wechsel < 2 Then GoTo Sprung
End If
'Blattname = ActiveWorkbook.ActiveSheet.Name
If Blattname = "Liveticker Ergebnis" Then
Zeit = "00:01:00"
End If
If Blattname = "32er Grafik" Then
Zeit = "00:00:20"
End If
StartWechsel = Workbooks("LivetickerAusgabeMonitor_Auto_Wechsel.xlsm").Worksheets("Gruppenspiele Übersicht").Cells(2, 57).Value
If Blattname = "Gruppenspiele Übersicht" Then
Zeit = "00:00:05"
End If
If StartWechsel = 1 Then
Dim INDEX As Long
INDEX = ActiveSheet.INDEX
If INDEX = Worksheets.Count Then INDEX = 1
Worksheets(INDEX + 1).Activate
If Blattname = "Gruppenspiele Übersicht" Then
Blattname = "Liveticker Ergebnis"
MsgBox Blattname
End If
If Blattname = "Liveticker Ergebnis" Then
Blattname = "32er Grafik"
MsgBox Blattname
End If
If Blattname = "32er Grafik" Then
Blattname = "Liveticker Ergebnis"
MsgBox Blattname
End If
Application.OnTime Now() + TimeValue(Zeit), "TabellenblattWechseln" hier kommt der Fehler
Else
Sprung:
Blattname = "Gruppenspiele Übersicht"
MsgBox Blattname
Application.OnTime Now() + TimeValue("00:00:10"), "TabellenblattWechseln"
End If
End Sub
|