Hello,
I have just really started to code on VBA but mainly from looking through such forums and using code from other macro's.
I have the following problem and feel i am just missing one simple piece of the puzzle as they say.
I need a macro when activated will do the following;
will look at the active sheet,
look at all the graphs,
select only the line graphs
(on the line graphs there might be 1 to 3 series, generally named after financial years e.g. 2012/13, 2013/14, 2014/15)
Will prompt the use to input the current financial year
from this information the macro will select the series the use has inputted in the step above.
Will then format this series ( i have the code to format to my specification)
Then ideally need the reversal so can turn the dashes back to connected lines.
So far the code i have is the following:</SPAN>
i think i am missing the link between activating all the chartobjects, making excel do an "IF chartype = xline, then function"..... format
Thanks for responses and sorry for my lack of skills
I have just really started to code on VBA but mainly from looking through such forums and using code from other macro's.
I have the following problem and feel i am just missing one simple piece of the puzzle as they say.
I need a macro when activated will do the following;
will look at the active sheet,
look at all the graphs,
select only the line graphs
(on the line graphs there might be 1 to 3 series, generally named after financial years e.g. 2012/13, 2013/14, 2014/15)
Will prompt the use to input the current financial year
from this information the macro will select the series the use has inputted in the step above.
Will then format this series ( i have the code to format to my specification)
Then ideally need the reversal so can turn the dashes back to connected lines.
So far the code i have is the following:</SPAN>
Code:
Sub New_year_LineChart()
nCharts = ActiveSheet.ChartObjects.Count
For iChart = 1 To nCharts
ActiveSheet.ChartObjects(iChart).Activate
If ActiveChartObjects(iChart).ChartType = xline Then
.Weight = xlMedium
.LineStyle = xlNone
.MarkerBackgroundColorIndex = 12
.MarkerForegroundColorIndex = 12
.MarkerStyle = xlDash
.Smooth = False
.MarkerSize = 7
.Shadow = False
End If
ActiveWindow.Visible = False
Windows("Test.xls").Activate
Next
End Sub
i think i am missing the link between activating all the chartobjects, making excel do an "IF chartype = xline, then function"..... format
Thanks for responses and sorry for my lack of skills