Link to home
Start Free TrialLog in
Avatar of Terrygordon
Terrygordon

asked on

Loop through multiple charts on a form in vb express

Hi all

I have a form with several chart objects (Chart1, Chart2, Chart3, etc.). The charts are created at runtime (currently using a with statement to define numerous properties of the chart).

At the minute I am using:

With Chart1
List of properties

With Chart2
List of properties

Etc.

However, as all the charts have multiple properties in common, I wondered if it was possible to loop through every chart on the form and set these common properties? This would drastically reduce the amount of code.

I've played around with trying to assign variable names to the charts and using 'Do' for each control on the form that is a chart, but my programming skills are pretty basic, and there is always something that VB doesn't like.

Regards

Terry
ASKER CERTIFIED SOLUTION
Avatar of Chris Roth
Chris Roth
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Terrygordon
Terrygordon

ASKER

Hi Visio guy

Brilliant. It works perfectly.

Regards

Terry