M
mrehandar
Hello there all you geniuses....please help a man in need
I am very new to VBA and i have a big task in hand...
Here is my problem:
I am trying to export graphs made in MS Graph 2000 and embedded in a
subfrom in an MS Access form.
I use this code on my export button:
Private Sub Command12_Click()
Dim graphExport As Object
Dim vendor As String
vendor = cmbVendor.Value
Set graphExport = Me.Ctl3PPContractChart.Object
graphExport.Export "C:\3PP Exported Charts\" & vendor & ".jpg", "JPEG"
Set graphExport = Nothing
Me.Ctl3PPContractChart.Action = acOLEClose
End Sub
Using cmbVendor, i am trying to name each chart differently and saving
them in the 3PP Exported Charts.
But when i click the Command12 button, i get the following error:
Runtime error '2793':
(database name) can't perform the operation specified in the Action
property of the visual basic procedure you are trying to run.
And when i click debug it takes me to "Me.Ctl3PPContractChart.Action =
acOLEClose"
But if i click End, and try to exit the form i get the error:
The Operation on the Chart Object Failed
The OLE server may not be registered
To register the OLE server please re-install it.
But the plus point here is that i can see the graphs getting exported
to the specified folder.
Whats happening?
Plz guys...help!
And after clicking ok, Access crashes!
I am very new to VBA and i have a big task in hand...
Here is my problem:
I am trying to export graphs made in MS Graph 2000 and embedded in a
subfrom in an MS Access form.
I use this code on my export button:
Private Sub Command12_Click()
Dim graphExport As Object
Dim vendor As String
vendor = cmbVendor.Value
Set graphExport = Me.Ctl3PPContractChart.Object
graphExport.Export "C:\3PP Exported Charts\" & vendor & ".jpg", "JPEG"
Set graphExport = Nothing
Me.Ctl3PPContractChart.Action = acOLEClose
End Sub
Using cmbVendor, i am trying to name each chart differently and saving
them in the 3PP Exported Charts.
But when i click the Command12 button, i get the following error:
Runtime error '2793':
(database name) can't perform the operation specified in the Action
property of the visual basic procedure you are trying to run.
And when i click debug it takes me to "Me.Ctl3PPContractChart.Action =
acOLEClose"
But if i click End, and try to exit the form i get the error:
The Operation on the Chart Object Failed
The OLE server may not be registered
To register the OLE server please re-install it.
But the plus point here is that i can see the graphs getting exported
to the specified folder.
Whats happening?
Plz guys...help!
And after clicking ok, Access crashes!