Läuft nicht auf Excel 2007
30.05.2013 16:46:28
Wanek
ich bräuchte wieder mal eure Hilfe.
Das Makro läuft nicht mit Excel 2007!
Ich weis nicht warum! Es kommt immer in dieser Zeile ein Fehler:
Gruß
Andreas
""" Name sPath & sFile As sPath & sNeu """
Sub Schaltfläche1_BeiKlick()
Dim sFile As String, sNeu As String
Const sPath As String = "C:\Heizung\Socket1\"
sFile = Dir(sPath & "Schalter*.txt")
sNeu = "schalter" & Replace(Replace(sFile, "schalter", ""), ".txt", "") + 1 & ".txt"
Name sPath & sFile As sPath & sNeu
End Sub