Chart.Application.DataSheet.Activate does not work

L

Leon Linnartz

Hi,

I have a chart (MS Graph 2000 object) on a form.
I want to show the datasheet for this chart by clicking a button, but my
code does virtually nothing (at least not that I can see).

Any suggestions??

Here is the code:

Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim OLEGraphObj As Object
Dim OLEDataSheet As Object
Set OLEGraphObj = Me!Graph0.Object
Set OLEDataSheet = OLEGraphObj.Application.DataSheet

' Me!Graph0.SetFocus ' added this line but does not work either
' OLEGraphObj.Activate ' added this line but does not work either
OLEDataSheet.Activate

Exit_Command1_Click:
Exit Sub

Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click

End Sub
 
Top