H
Henk
Based upon user selections, I delete and copy in flags and logo's in a chart.
Somehow, in some charts, the shape I copied in remains selected. This is
really no problem in Excel 2003 running under Vista, neither in Excel 2007
running under Vista, but it is in Excel 2007 running under XP. Charts become
totaly corrupted and unpresentable. Code used :
ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select
ActiveChart.Shapes(LogoOld).Select
Selection.Delete
Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select
When I select the ChartArea after running the code, I see that the LogoNew
is selected. When I select a title in the graph, the LogoNew becomes
unselected, but then the title remains selected. The only way to get rid of
it is delete the LogoNew and Undo afterwards (but I can not find VB code to
reproduce this).
Question is : How do I Unselect a shape on a Chart?
Somehow, in some charts, the shape I copied in remains selected. This is
really no problem in Excel 2003 running under Vista, neither in Excel 2007
running under Vista, but it is in Excel 2007 running under XP. Charts become
totaly corrupted and unpresentable. Code used :
ActiveSheet.ChartObjects("Graph02Base").Activate
ActiveChart.ChartArea.Select
ActiveChart.Shapes(LogoOld).Select
Selection.Delete
Sheets("Data availability").Shapes(LogoNew).Copy
ActiveSheet.ChartObjects("Graph02Base").Select
ActiveChart.Paste
ActiveChart.ChartArea.Select
ActiveWindow.Visible = False
Windows("FileName.xls").Activate
Range("A1").Select
When I select the ChartArea after running the code, I see that the LogoNew
is selected. When I select a title in the graph, the LogoNew becomes
unselected, but then the title remains selected. The only way to get rid of
it is delete the LogoNew and Undo afterwards (but I can not find VB code to
reproduce this).
Question is : How do I Unselect a shape on a Chart?