Bonsoir,
Je suis vraiment coincée ce soir sur mon application que j'ai développé sur la version Excel 2003 pour plusieurs utilisateurs...
Or une partie des utilisateurs sont sur Excel 2003 et d'autres sur Excel 2007. 😡
Tout fonctionne à merveille sur mon excel 2003 mais ca bloque sur la genération des graphiques dont voici le code que j'utilise :
	
	
	
	
	
		
La macro bloque sur la ligne
.HasTitle = False
J'ai l'impression qu'il ne reconnait pas ce code sur la version 2007 😕
Je suis désesperrée car je dois déployer cette application demain.... 🙁
Si quelqu'un aurait une idée pour me sortir de ce probleme. Je cherche un code qui peut marcher sur les 2 versions d'excel. 😱
Sinon, j'ai programmé sur Excel 2003.... je ne pensais pas que j'aurai des problemes sur 2007.
Merci beaucoup 🙄
Malka
	
		
			
		
		
	
				
			Je suis vraiment coincée ce soir sur mon application que j'ai développé sur la version Excel 2003 pour plusieurs utilisateurs...
Or une partie des utilisateurs sont sur Excel 2003 et d'autres sur Excel 2007. 😡
Tout fonctionne à merveille sur mon excel 2003 mais ca bloque sur la genération des graphiques dont voici le code que j'utilise :
		VB:
	
	
	Sub GraphiquePrincipale()
Application.ScreenUpdating = False
'Demasquage des sheets masquées
Sheets("Winshuttle").Visible = True
Sheets("WinshuttleCléImmo").Visible = True
Sheets("ClésDistribution").Visible = True
Sheets("UO CP").Visible = True
Sheets("UO CC").Visible = True
Sheets("UO OI").Visible = True
Sheets("UO RE").Visible = True
Sheets("Paramètres").Visible = True
    y = ActiveCell.Row
    
  
 'Construction du premier graphique
    Range("I" & y, "T" & y).Copy
    Sheets("Paramètres").Select
    Range("I2").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("UO").Select
    Application.CutCopyMode = False
    Sheets("Paramètres").Select
    CelluleVide = WorksheetFunction.CountBlank(Range("I2:T2"))
       If CelluleVide <> 0 Then
    Range("G2").Select
    Selection.Copy
    Range("I2:T2").Select
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Application.CutCopyMode = False
       End If
       
    Sheets("UO").Select
    Range("W" & y, "AH" & y).Copy
    Sheets("Paramètres").Select
    Range("I3").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("UO").Select
    Application.CutCopyMode = False
    Sheets("Paramètres").Select
    CelluleVide = WorksheetFunction.CountBlank(Range("I3:T3"))
       If CelluleVide <> 0 Then
    Range("G3").Select
    Selection.Copy
    Range("I3:T3").Select
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Application.CutCopyMode = False
       End If
       
    Sheets("UO").Select
    Range("AK" & y, "AV" & y).Copy
    Sheets("Paramètres").Select
    Range("I4").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("UO").Select
    Application.CutCopyMode = False
    Sheets("Paramètres").Select
    CelluleVide = WorksheetFunction.CountBlank(Range("I4:T4"))
       If CelluleVide <> 0 Then
        Range("G4").Select
    Selection.Copy
    Range("I4:T4").Select
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Application.CutCopyMode = False
        End If
    
    Sheets("UO").Select
    Range("BF" & y, "BQ" & y).Copy
    Sheets("Paramètres").Select
    Range("I5").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("UO").Select
    Application.CutCopyMode = False
    Sheets("Paramètres").Select
    CelluleVide = WorksheetFunction.CountBlank(Range("I5:T5"))
       If CelluleVide <> 0 Then
    Range("G5").Select
    Selection.Copy
    Range("I5:T5").Select
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Application.CutCopyMode = False
            End If
'Ajout du nouveau graphique (premier)
    
    
    Charts.Add
    ActiveChart.ChartType = xlLineMarkers
    ActiveChart.SetSourceData Source:=Sheets("Paramètres").Range("H1:T1,H2:T5") _
        , PlotBy:=xlRows
   
    ActiveChart.Location Where:=xlLocationAsObject, Name:="UO"
    
    With ActiveChart
        .HasTitle = False
        .Axes(xlCategory, xlPrimary).HasTitle = False
        .Axes(xlValue, xlPrimary).HasTitle = True
        .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Montant en €"
    End With
    
    ActiveChart.ChartArea.Select
    With ActiveChart
        .HasTitle = True
        .ChartTitle.Characters.Text = Application.Trim(Range("C" & y)) & " / " & Application.Trim(Range("B" & y))
    End With
    
         
    With ActiveChart.Axes(xlCategory)
        .HasMajorGridlines = True
        .HasMinorGridlines = False
    End With
    With ActiveChart.Axes(xlValue)
        .HasMajorGridlines = True
        .HasMinorGridlines = False
    End With
    ActiveChart.HasDataTable = False
    ActiveChart.Axes(xlValue).MajorGridlines.Select
    With Selection.Border
        .ColorIndex = 17
        .Weight = xlHairline
        .LineStyle = xlDot
    End With
    ActiveChart.Axes(xlCategory).MajorGridlines.Select
    With Selection.Border
        .ColorIndex = 17
        .Weight = xlHairline
        .LineStyle = xlDot
    End With
    ActiveChart.PlotArea.Select
    With Selection.Border
        .ColorIndex = 57
        .Weight = xlThin
        .LineStyle = xlContinuous
    End With
    Selection.Interior.ColorIndex = xlNone
    ActiveChart.SeriesCollection(1).Select
    With Selection.Border
        .ColorIndex = 57
        .Weight = xlThick
        .LineStyle = xlContinuous
    End With
    With Selection
        .MarkerBackgroundColorIndex = xlAutomatic
        .MarkerForegroundColorIndex = xlAutomatic
        .MarkerStyle = xlAutomatic
        .Smooth = False
        .MarkerSize = 9
        .Shadow = False
    End With
    
    ActiveChart.Axes(xlCategory).Select
    With Selection.TickLabels
        .Alignment = xlCenter
        .Offset = 100
        .ReadingOrder = xlContext
        .Orientation = xlUpward
    End With
    
     'Carateristiques de la deuxieme serie du premier graphique
    ActiveChart.SeriesCollection(2).Select
    With Selection.Border
        .ColorIndex = 50
        .Weight = xlThick
        .LineStyle = xlContinuous
    End With
    With Selection
        .MarkerBackgroundColorIndex = 50
        .MarkerForegroundColorIndex = 50
        .MarkerStyle = xlSquare
        .Smooth = False
        .MarkerSize = 5
        .Shadow = False
    End With
    ActiveChart.ChartArea.Select
     'Carateristiques de la troisieme serie du premier graphique
    ActiveChart.SeriesCollection(3).Select
    With Selection.Border
        .ColorIndex = 15
        .Weight = xlThick
        .LineStyle = xlContinuous
    End With
    With Selection
        .MarkerBackgroundColorIndex = 15
        .MarkerForegroundColorIndex = 15
        .MarkerStyle = xlSquare
        .Smooth = False
        .MarkerSize = 5
        .Shadow = False
    End With
    ActiveChart.ChartArea.Select
     'Carateristiques de la quatrieme serie du premier graphique
    ActiveChart.SeriesCollection(4).Select
    With Selection.Border
        .ColorIndex = 45
        .Weight = xlThick
        .LineStyle = xlContinuous
    End With
    With Selection
        .MarkerBackgroundColorIndex = 45
        .MarkerForegroundColorIndex = 45
        .MarkerStyle = xlSquare
        .Smooth = False
        .MarkerSize = 5
        .Shadow = False
    End With
    ActiveChart.ChartArea.Select
With Sheets("UO").ChartObjects(1)
.Top = Range("BF" & y + 2).Top
.Left = Range("AZ" & y).Left
End With
  
Range("AZ" & y).Select
'Masquage des sheets masquées
Sheets("Winshuttle").Visible = False
Sheets("WinshuttleCléImmo").Visible = False
Sheets("ClésDistribution").Visible = False
Sheets("UO CP").Visible = False
Sheets("UO CC").Visible = False
Sheets("UO OI").Visible = False
Sheets("UO RE").Visible = False
Sheets("Paramètres").Visible = False
Application.ScreenUpdating = True
End Sub
	La macro bloque sur la ligne
.HasTitle = False
J'ai l'impression qu'il ne reconnait pas ce code sur la version 2007 😕
Je suis désesperrée car je dois déployer cette application demain.... 🙁
Si quelqu'un aurait une idée pour me sortir de ce probleme. Je cherche un code qui peut marcher sur les 2 versions d'excel. 😱
Sinon, j'ai programmé sur Excel 2003.... je ne pensais pas que j'aurai des problemes sur 2007.
Merci beaucoup 🙄
Malka
			
				Dernière édition: