Hi
I have a VB.Net program using VS2105 Pro. I have successfully created a simple pie chart and everything works fine. So that students can cut and paste the chart I wanted to remove the border. So, I ran a macro in excel, removed the "line"
border and looked at the recording which was: ActiveSheet.Shapes("Chart 1").Line.Visible = msoFalse
The only way I could get this to work was using the following format method:
.ChartArea.Format.Line.Visible = Microsoft.Office.Core.MsoTriState.msoFalse
This worked fine on my computer but another computer threw an error "Return argument has an invalid type". Both computers are Windows 10 running Excel 2016.
So I tried another approach which seems to work:
.ChartArea.Border.LineStyle = Excel.XlLineStyle.xlLineStyleNone
Well I know "if it works then it works" but I was thinking "if it works, is it right and is it reliable?" Or is there a better way to remove a border which I have not yet found after a thorough trawl of the internet....
Many thanks for any advice.
Margarita
Margarita_Cody