Using Excel (VBA) to create a Chart Control in Excel or Web Page??


I need to create a chart to display data from an Excel report. The report is drawing the data from SQL using vba in the back ground.

Can you point me in the direction of some sample vba code to create a chart control in Excel?

Also, can anyone comment on the benefits of displaying the chart in either Excel or as a Web Page??

Many thanks,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sample code and instructions are available at the links below. Deciding on Excel parts vs. ASP.NET or Silverlight depends on your audience, goals, and infrastructure available. If you have a server supporting the .NET framework 3.5 sp1 for ASP.NET or Silverlight, that is a better solution in many ways than an Excel spreadsheet or Excel plugin in a web site. If you need a portable solution where a server is not available, then a spreadsheet may be a good solution.

Excel plugin on a website: 

ASP.NET examples and resources: 

Silverlight chart example: 

Let me know if you need something more specific.

Thanks, Eric

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.