N
Newbie
Hello,
The following macro works fine in Excel 2003. Its purpose is to set the
origin of the 2 axes (x and y, with a timescale on both x and y) of a
graphe.
On my PC which is running Excel 2003, every work fine. On others PCs with
Excel 97, it bumps on the line :
.MinimumScale = Deb
with the error message : "Impossible to set the MinimumScale property"
What is the problem?
Thanks for your help!
Newbie
----------------------------
Sub CalerOrigineAxes()
Dim Graphique As Object, Crobard As Object
Dim Deb As Long, Fin As Long, Clic As Integer
For Each Graphique In ActiveSheet.ChartObjects
Deb = [DebProj] 'Date de début du projet
Fin = [FinProj] 'Date de fin du projet
Set Crobard = Graphique.Chart
Clic = MsgBox("Confirmez vous la date de Début du projet : " &
Format(Deb, "dd/mm/yyyy") & Chr(13) & _
"et la date de Fin : " & Format(Fin, "dd/mm/yyyy") & Chr(13) & Chr(13) &
"Sinon, corrigez les dans la feuille Excel", vbOKCancel, "Caler l'origine
des axes")
If Clic = vbCancel Then Exit Sub 'Si l'utilisateur à cliqué sur
annuler...
With Crobard.Axes(xlCategory)
.MinimumScale = Deb
.MaximumScale = Fin
.MinorUnit = 1
.MajorUnit = 15
.Crosses = xlCustom
.CrossesAt = Deb
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
The following macro works fine in Excel 2003. Its purpose is to set the
origin of the 2 axes (x and y, with a timescale on both x and y) of a
graphe.
On my PC which is running Excel 2003, every work fine. On others PCs with
Excel 97, it bumps on the line :
.MinimumScale = Deb
with the error message : "Impossible to set the MinimumScale property"
What is the problem?
Thanks for your help!
Newbie
----------------------------
Sub CalerOrigineAxes()
Dim Graphique As Object, Crobard As Object
Dim Deb As Long, Fin As Long, Clic As Integer
For Each Graphique In ActiveSheet.ChartObjects
Deb = [DebProj] 'Date de début du projet
Fin = [FinProj] 'Date de fin du projet
Set Crobard = Graphique.Chart
Clic = MsgBox("Confirmez vous la date de Début du projet : " &
Format(Deb, "dd/mm/yyyy") & Chr(13) & _
"et la date de Fin : " & Format(Fin, "dd/mm/yyyy") & Chr(13) & Chr(13) &
"Sinon, corrigez les dans la feuille Excel", vbOKCancel, "Caler l'origine
des axes")
If Clic = vbCancel Then Exit Sub 'Si l'utilisateur à cliqué sur
annuler...
With Crobard.Axes(xlCategory)
.MinimumScale = Deb
.MaximumScale = Fin
.MinorUnit = 1
.MajorUnit = 15
.Crosses = xlCustom
.CrossesAt = Deb
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With