Bonjour,
J'ai un problème avec une macro qui fonctionne correctement sur les toutes les versions Excel antérieure à la version 2019. Sur la version 2019 une erreur 1004 s'affiche à chaque fois qu'on veut lancer la macro et apparemment l'erreur est sur la ligne "ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Cells(i, 3), Address:="", SubAddress:="'" & Sh1.Name & "'!A1", TextToDisplay:=Sh1.Name". Si vous pouvez m'aider svp. Merci par avance
	
		
			
		
		
	
				
			J'ai un problème avec une macro qui fonctionne correctement sur les toutes les versions Excel antérieure à la version 2019. Sur la version 2019 une erreur 1004 s'affiche à chaque fois qu'on veut lancer la macro et apparemment l'erreur est sur la ligne "ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Cells(i, 3), Address:="", SubAddress:="'" & Sh1.Name & "'!A1", TextToDisplay:=Sh1.Name". Si vous pouvez m'aider svp. Merci par avance
Sub ONGLETS()
Application.ScreenUpdating = False
Dim Sh1 As Worksheet, i%
i = 1
Feuil.Activate
Columns("C:C").ClearContents
For Each Sh1 In Worksheets
    If Sh1.Name <> ActiveSheet.Name And  Sh1.Name <> "RECAP" Then
       ActiveSheet.Hyperlinks.Add Anchor:=ActiveSheet.Cells(i, 3), Address:="", SubAddress:="'" & Sh1.Name & "'!A1", TextToDisplay:=Sh1.Name
    i = i + 1
    End If
Next Sh1
' Tri des suivis
    Range("C1:C23").Select
     ActiveWorkbook.Worksheets("ACCUEIL").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("ACCUEIL").Sort.SortFields.Add Key:=Range("C1:C23") _
        , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        With ActiveWorkbook.Worksheets("ACCUEIL").Sort
        .SetRange Range("C1:C23")
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
' Mise en forme du texte
ActiveSheet.Unprotect ""
    Range("C1:C23").Select
    With Selection.Font
        .Name = "ARIAL"
        .FontStyle = "Normal"
        .Size = 13
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleSingle
        .ThemeColor = xlThemeColorHyperlink
        .TintAndShade = 0
        .ThemeFont = xlThemeFontNone
    End With
    Selection.Font.Underline = xlUnderlineStyleNone
        Range("B2").Select
Application.ScreenUpdating = True
ActiveSheet.Protect ""
End Sub
Pièces jointes
			
				Dernière édition: