I am using Excel 2013 and Window 7. I created a Scatter Chart. But the Vertical Grid lines' colors are very shallow (light).
I tried to edit the Chart with Excel 's Macro and then translate it into VEE 9.32. But VEE 9.32 does not have a library called
RGB(). So the vertical Grid color is still not black.
Sub Macro2()
'
' Macro2 Macro
'
'
ActiveChart.Axes(xlValue).MajorGridlines.Select
ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesNone)
ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor)
ActiveChart.Axes(xlValue).HasMajorGridlines = True
ActiveChart.ChartArea.Select
ActiveChart.Axes(xlValue).MajorGridlines.Select
ActiveChart.Axes(xlValue).MajorGridlines.Select
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(0, 0, 0) // VEE does not have RGB();
End With
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorText1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
End With
End Sub
Please advise. Thanks.
I tried to edit the Chart with Excel 's Macro and then translate it into VEE 9.32. But VEE 9.32 does not have a library called
RGB(). So the vertical Grid color is still not black.
Sub Macro2()
'
' Macro2 Macro
'
'
ActiveChart.Axes(xlValue).MajorGridlines.Select
ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesNone)
ActiveChart.SetElement (msoElementPrimaryCategoryGridLinesMajor)
ActiveChart.Axes(xlValue).HasMajorGridlines = True
ActiveChart.ChartArea.Select
ActiveChart.Axes(xlValue).MajorGridlines.Select
ActiveChart.Axes(xlValue).MajorGridlines.Select
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(0, 0, 0) // VEE does not have RGB();
End With
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorText1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
.Transparency = 0
End With
End Sub
Please advise. Thanks.
Even though you can control mostly everything via Active X and the like, not all parts from newer Excel Versions are supported,
In your case i do not know what is supported - perhaps there is a command which you can use to get your results, but this is not the recommended way to do it-
as -if ms changes something, then you have to change your command again....not very clever at the end of the day.
Much better, and my recommended way of doing these things:
1. make an ecxel template, with one sheet for your datas, and you put at the beginning some dummy data in it.
2. on the other sheets, you make all your diagrams and things you want to do, like thinner blue shining lines ;-)
3. Store this
4. Use vee, open the template and just put your data in - in this case just in sheet 1.
5. Store your new sheet with a different name.
Voila...
So that you just use VEE to update your data, no need for macros or cryptic activeX commands anymore. Recommended way....