If "Dateiname Teilstring" then
19.07.2005 13:54:27
Martin
wie kriege ich die folgende Prüfung hin?
Nur ausführen wenn der Dateiname den Text "Vorlage Meldeblatt Event-Aktionen" enthält also alle Versionen ebenfalls erlauben zB.
"Vorlage Meldeblatt Event-Aktionen1"
Sub Dateiname enthält ()
'Diese Prüfung kriege ich nicht hin.
If ThisWorkbook.Name = Finden("Vorlage Meldeblatt Event-Aktionen") Then
Application.EnableEvents = False
' Jahr
Cells(3, 21).Value = Cells(3, 32).Value
' Woche
Cells(4, 21).Value = Cells(4, 32).Value
Cells(4, 23).Value = Cells(4, 34).Value
' Zeitraum
Cells(5, 21).Value = Cells(5, 32).Value
Cells(5, 23).Value = Cells(5, 34).Value
' Erst- Letztlieferung
Cells(6, 21).Value = Cells(6, 32).Value
' Felder mit "=" zurücksetzen
Formel = "=rc[-11]"
Cells(3, 32).Select
ActiveCell.FormulaR1C1 = Formel
Cells(4, 32).Select
ActiveCell.FormulaR1C1 = Formel
Cells(4, 34).Select
ActiveCell.FormulaR1C1 = Formel
Cells(5, 32).Select
ActiveCell.FormulaR1C1 = Formel
Cells(4, 34).Select
ActiveCell.FormulaR1C1 = Formel
Cells(6, 32).Select
ActiveCell.FormulaR1C1 = Formel
ActiveSheet.Calculate
Application.EnableEvents = True
MsgBox ("Zeiten umgestellt")
End If
End Sub
Danke für die Hilfe