I'm creating a simple little macro that draws a chart from some data in Excel. The frustration comes because every time my macro draws a chart, it sequences the number. The first chart is "chart 1" the second is "chart 2" even if "chart 1" no longer exists.
I know there's a simple answer to this problem but I can't find it, hence the frustration. Please could someone tell me how to take charge of the chart identification before I chew another corner off my keyboard!
Steve
nutwood33
0
Newbie Poster
Recommended Answers
Jump to PostHow are you adding the chart? If you are using the Charts.Add method then you can use this to get a reference to the new chart object.
dim chartNew as Chart set chartNew=ActiveWorkBook.Charts.Add chartNew.ChartTitle.Characters.Text = "This is a New Chart"
And so on.
By the way …
All 4 Replies
mnemtsas
3
Posting Whiz in Training
nutwood33
0
Newbie Poster
mnemtsas
3
Posting Whiz in Training
Tonye53
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.