AW: Hyperlink
08.06.2020 12:04:58
Bernd
Hi,
habe nachstehendes Makro mal hier erhalten. Eventuell hilft es weiter wenn Du es nach
Deinen Wünschen angepasst hast:
Option Explicit ' IMMER zu empfehlen
Sub sbName()
Dim strN As String, X As Long, Y As Long, i As Long
Application.ScreenUpdating = False ' evtl. NACH dem Test aktivieren
With Sheets("Tabelle1") ' anpassen
.Unprotect
For X = 1 To Worksheets.Count - 1
For Y = X + 1 To Worksheets.Count
If Worksheets(Y).Name strN Then
.Cells(i + 2, 1) = i - 1
Worksheets(i).Cells(2, 2).Value = i - 1
Worksheets(i).PageSetup.RightFooter = CStr(i - 1)
End If
Next i
.Columns("A:A").EntireColumn.AutoFit
Application.PrintCommunication = True
Application.GoTo Reference:="R3C1"
.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End With
Application.ScreenUpdating = True
End Sub
MfG Bernd