IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Macros et VBA Excel Discussion :

Erreur d'Exécution 5 en mode partagé seulement [XL-2007]


Sujet :

Macros et VBA Excel

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 9
    Par défaut Erreur d'Exécution 5 en mode partagé seulement
    Bonjour,
    J'ai un souci avec une macro qui me sert à trier plusieurs colonnes suivant l'affichage des couleurs. Le problème est que ça fonctionne très bien avant que je partage le fichier.
    Si vous avez des explications ou même des solutions...
    Merci d'avance

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    Sub Tri()
    '
    ' Tri Macro
    '
     
    '
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Add(Range( _
    "E2:E59"), xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = _
    RGB(255, 207, 55)
    With ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Add(Range( _
    "F2:F59"), xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = _
    RGB(255, 0, 0)
    With ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Add(Range( _
    "G2:G59"), xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = _
    RGB(197, 190, 151)
    With ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Add(Range( _
    "H2:H59"), xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = _
    RGB(184, 204, 228)
    With ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Add(Range( _
    "I2:I59"), xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = _
    RGB(217, 151, 149)
    With ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort.SortFields.Add(Range( _
    "J2:J59"), xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = _
    RGB(178, 161, 199)
    With ActiveWorkbook.Worksheets("Sommaire").AutoFilter.S ort
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    ActiveWindow.ScrollColumn = 5
    ActiveWindow.ScrollColumn = 4
    ActiveWindow.ScrollColumn = 3
    ActiveWindow.ScrollColumn = 2
    ActiveWindow.ScrollColumn = 1
    End Sub
    PS : Je vous aurai bien laisé une copie de mon fichier mais impossible de joindre un .xlsm

  2. #2
    Expert confirmé
    Homme Profil pro
    aucune
    Inscrit en
    Septembre 2011
    Messages
    8 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : aucune

    Informations forums :
    Inscription : Septembre 2011
    Messages : 8 208
    Par défaut
    Bonjour,

    Excel n'est pas fait pour travailler en mode partagé, bien qu'il le permette. C'est la source de quantités d'ennuis dont le tien. Tu peux peut-être charger ton classeur sur un site comme cjoint.com et poster ici le lien généré; ou bien compresser ton classeur au format zip avant de le joindre.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Erreur à l'exécution en mode debug
    Par sebousseau dans le forum Qt Creator
    Réponses: 7
    Dernier message: 18/04/2015, 16h04
  2. [AC-2007] Erreur d'exécution en mode runtime
    Par Kounta dans le forum Runtime
    Réponses: 9
    Dernier message: 18/11/2013, 16h54
  3. Réponses: 0
    Dernier message: 11/02/2013, 18h49
  4. [AC-2007] Erreur d'exécution sur certains filtres en mode runtime
    Par joeyr dans le forum Runtime
    Réponses: 2
    Dernier message: 25/05/2012, 11h14
  5. Message erreur : mode partagé
    Par shwepsy dans le forum Sécurité
    Réponses: 3
    Dernier message: 22/02/2010, 20h51

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo