VBA, Excel, charting and the active cell

Mike Miles
08-07-2001, 03:53 AM
I create a chart with VBA in Excel, then start adding series to it. Mindful that the user might have highlighted something before activating my macro (which has no use for the highlighting) I set the active cell to A1 to stop the chart adding the highlighted range as a series.

But then Excel adds the active cell as a series.

Is there an easier way of stopping this or is it a case of just deleting this extra series?

Thinker
08-07-2001, 07:23 AM
This isn't something I have done so I don't know if my idea will help. Is it possible that instead of setting the active cell to A1 you set it to either the first or last cell in your series.

I think therefore I am... sometimes right. images/icons/wink.gif

Mike Miles
08-07-2001, 07:30 AM
Good idea - but as I'm renaming series anyway I'll just look out for a series called Series1 and ruthlessly hunt it down like a dog.

Without wanting to detract from your rating, is the extra aitch really necessary?

Thinker
08-07-2001, 07:36 AM
extra aitch??? Sorry to be so dense but I don't get it.

I think therefore I am... sometimes right. images/icons/wink.gif

Mike Miles
08-07-2001, 07:41 AM
Your post rating seems to be decorated with a very flattering but slightly superfluous 'h'.

Quick nervous check on Dictionary.com - yeah.

Thinker
08-07-2001, 08:04 AM
LOL images/icons/laugh.gif Those names are assigned automatically by the forum software. I am not the greatest speller and, as many times as I have looked at it, I never noticed. This is really funny. Thanks for pointing it out.

I think therefore I am... sometimes right. images/icons/wink.gif

Mike Miles
08-07-2001, 08:08 AM
It's a pleasure.

I'm bored and working in Excel 97's VBA, which for someone who's been mollycoddled in VB 6 for so long is a bit of a shock.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum