Perfect! Thanks Peter, this worked perfectly. Hid both of the grouped
charts.
Harold
Peter T wrote:
> Your code as written should work fine in Excel 2003. But it's not clear what
> you have to begin with, which might be why you didn't get an answer in the
> charting group.
>
> Speculating, do you have two chartobjects which are grouped. If so is it
> just a group of the two chartobjects. If so, simply -
> Activesheet.Shapes("myChartGroup").Visible = false
>
> If you have something different, eg several items in the group but you only
> want to hide two, try and explain what you have and want to do.
>
> Regards,
> Peter T
>
> "Harold Good" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>>> Hi,
>>>
>> Sorry I've copied this over from my post in the Charting newsgroup since
>> there's not much activity there.
>>
>>> I have the following code which works fine in 2007. But since I have some
>>> users that still use 2003, when I save the spreadsheet in 2003 xls
>>> format, this code will no longer work. I found that when I ungroup the
>>> two charts, then it works fine.
>>>
>>> Do I need to use code to Ungroup them first, or is there a simple
>>> solution?
>>>
>>> Thanks,
>>> Harold
>>>
>>> Sub Hide_Two_Charts()
>>> Sheets("Budget").ChartObjects("Chart 130").Visible = False
>>> Sheets("Budget").ChartObjects("Chart 190").Visible = False
>>> End Sub
>>>
>
>
>
|