HI,
I have a form and I have put an Excel Sheet control on the form. I have extracted some data from a database and I want to put the data onto the Excel control. The sheet is called "sheet1" which is the default. I am not sure how to access the "sheet1". The control is already on the form so what is the syntax to add the data to the sheet? Do I have to do all this?
Dim ExcelApp as Object
Dim ExcelWkb as Object
Dim ExcelSht as Object
Set ExcelApp = New Excel.Application
Set ExcelWkb = ExcelApp.Workbooks.Open("C:\Documents and Settings\cedross\Desktop\UniExample\EccNet_Data.xls"
Set ExcelSht = ExcelWkb.Sheets(1)
Any help would be appreciated. Thanks
babalas
I have a form and I have put an Excel Sheet control on the form. I have extracted some data from a database and I want to put the data onto the Excel control. The sheet is called "sheet1" which is the default. I am not sure how to access the "sheet1". The control is already on the form so what is the syntax to add the data to the sheet? Do I have to do all this?
Dim ExcelApp as Object
Dim ExcelWkb as Object
Dim ExcelSht as Object
Set ExcelApp = New Excel.Application
Set ExcelWkb = ExcelApp.Workbooks.Open("C:\Documents and Settings\cedross\Desktop\UniExample\EccNet_Data.xls"
Set ExcelSht = ExcelWkb.Sheets(1)
Any help would be appreciated. Thanks
babalas