#1 error msg

open
nobody
None
5
2009-01-06
2009-01-06
Jon Macmichael
No

Hello

cannot get past a 'bug' (?) with a sub/line that works fine but for when trying to save as ....invisible...

The sub sarts as per the following but stops on the last line below when trying to 'save as';

Public Sub ClearData()
Dim iSeriesCount, ii As Integer
Sheets("MSchart").Select
ActiveSheet.ChartObjects("Chart 2").Activate'#visible
.....

It's an embedded chart and is grouped with some scrollbars etc. I notice that when grouped I can only get the .name returned as "Group 15" etc (counting up by 1 on repetitions of a test). However, I always have these items grouped and make all calls to the chart per;

Sheets("MSchart").Select
ActiveSheet.ChartObjects("Chart 2").Activate

It seems that, maybe, Invisible Basic is sticking on this item or its name?

Also, the file uses a 'Reference' to Metalib5.0, but all references should be '#visible .

Thanks
Jon Macmichael

jonmac@bigpond.com

Discussion

  • John Gunther
    John Gunther
    2009-03-27

    I really don't know what could be causing this.

    It's worth a try to replace your declaration line with two separate lines:

    Dim iSeriesCount As Integer
    Dim ii as Integer

    I don't believe I ever tested such declarations

    Sorry for the delayed response, I spend most of my spare time on other open source projects now.

    John