MSChart.chartdata + Excel Names

F

francois

Hello,

I have created a user form and trying to display a MSCHart.
I have defined the data in a spreadhseet. This data is made three
column Time, A1, A2. I have defined a name "Data" with these three
column.
THis is the cource code.

Private Sub MSChart1_OLEStartDrag(Data As MSChart20Lib.DataObject,
AllowedEffects As Long)
MSChart1.ChartData = Names("Data").RefersToRange.Value
MSChart1.Refresh
End Sub

When opening the user form the data from "Data" do not show up.

Thanks for your help

Francois
 
M

Michel Pierron

Hi Francois,
Try:
Private Sub UserForm_Initialize()
MSChart1.ChartData = Names("Data").RefersToRange.Value
End Sub

MP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top