Format Graph Border Using Vba

TimTDP

Registered User.
Local time
Today, 19:52
Joined
Oct 24, 2008
Messages
213
I have the following code:

Public pubChartAreaBorderLineStyle

pubChartAreaBorderLineStyle = "xlContinuous"

With grphChart.ChartArea.Border
.LineStyle = pubChartAreaBorderLineStyle
End With

Access throws a syntax error 1004 on .LineStyle = pubChartAreaBorderLineStyle

If I change the code to .LineStyle =1, the code runs fine

Why does it not like pubChartAreaBorderLineStyle?

Thanks in advance
 
Try: -
pubChartAreaBorderLineStyle = xlContinuous
 
Hey TIMTDP - the chart object in access is very similar to the graph in excel. Thus if you have having problems with these kinds of things. Open up excel and make your graph, then while recoding a macro in excel make the changes you want. Then have a look at the recorded macro. This is going to give you a good idea on what you can try or at least give you something to do some more research on.
 

Users who are viewing this thread

Back
Top Bottom