Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 How can i open Excel sheet from VB6

Author  Topic 

Mamatha
Posting Yak Master

102 Posts

Posted - 2005-02-10 : 01:46:37
Hi

I want to add a new Excelsheet and open that sheet from VB6,like exactly the function workbooks.add function will do in VBA with excel.Please give me the solution.


Mamatha

sudheesh_k_s
Starting Member

10 Posts

Posted - 2005-02-28 : 06:55:53
set the reference to Microsoft excel 9.0 library or what erver excel library is available

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet

Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets.Add


Xlsheet.cells(rowno,columnno) = your text
Go to Top of Page
   

- Advertisement -