ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding a Chart or Worsheet??? with VB.NET (https://www.excelbanter.com/excel-programming/322576-adding-chart-worsheet-vbulletin-net.html)

[email protected]

Adding a Chart or Worsheet??? with VB.NET
 
Hi:
I have this problem, I have to insert first a chart, after a worksheet
to an excel file with VB.NET.

I'get an error in line 3 (below) "not found public member 'Cells' in
type 'Chart'"

How Can I define in line (1) the type of worksheets???

1 excelBook.Sheets.Add(Befo=excelBook.Sheets(tab lename + 1))
2 For Each dcColumn In dstDataset.Tables(tablename).Columns
3 excelApp.ActiveSheet.Cells(1, x) = dcColumn.ColumnName
4 x += 1
5 Next


thanks in advance!


Tom Ogilvy

Adding a Chart or Worsheet??? with VB.NET
 
Charts.Add

Worksheets.Add

--
Regards,
Tom Ogilvy

wrote in message
oups.com...
Hi:
I have this problem, I have to insert first a chart, after a worksheet
to an excel file with VB.NET.

I'get an error in line 3 (below) "not found public member 'Cells' in
type 'Chart'"

How Can I define in line (1) the type of worksheets???

1 excelBook.Sheets.Add(Befo=excelBook.Sheets(tab lename + 1))
2 For Each dcColumn In dstDataset.Tables(tablename).Columns
3 excelApp.ActiveSheet.Cells(1, x) = dcColumn.ColumnName
4 x += 1
5 Next


thanks in advance!





All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com