C
Chris
I would like to seek help on how To embed and automate Excel with Visual
Basic.
Refer to
http://support.microsoft.com/kb/q242243/
I have extract a few lines of coding, with an excel embedded in the form
already.
Private Sub Command0_Click()
'Reference to the Microsoft Excel 9.0 Object Library.
Dim xlBook As Excel.Workbook
Set xlBook = Me![oleChart_1].Object
xlBook.Sheets(2).Select
xlBook.Sheets(2).Activate
xlBook.Sheets(2).Range("A1:C1").Select
End Sub
However, i fail to select the range, with run-time error '1004' Select
method of Range class failed
Might anyone help?
Thanks in adavnce!
Chris
Basic.
Refer to
http://support.microsoft.com/kb/q242243/
I have extract a few lines of coding, with an excel embedded in the form
already.
Private Sub Command0_Click()
'Reference to the Microsoft Excel 9.0 Object Library.
Dim xlBook As Excel.Workbook
Set xlBook = Me![oleChart_1].Object
xlBook.Sheets(2).Select
xlBook.Sheets(2).Activate
xlBook.Sheets(2).Range("A1:C1").Select
End Sub
However, i fail to select the range, with run-time error '1004' Select
method of Range class failed
Might anyone help?
Thanks in adavnce!
Chris