hi i have written one progrm in vb but i want its output in excel but i am not able to coonect excel to vb so plz help me
how to connect excel to vb
Collapse
X
-
Which VB? VBA (which application), VB6, or VB.NET? Do you want to use ADO or access Excel directly?Originally posted by giriabhi i have written one progrm in vb but i want its output in excel but i am not able to coonect excel to vb so plz help meComment
-
No VB6 here, but it maybe the Tools, References menu. Maybe even Ctrl R. In any case, it's the References or Add References menu. Here's a thread with some of the objects you'll need, http://www.thescripts.com/forum/thread641830.htmlOriginally posted by giriabhow to add the object libraryComment
-
Originally posted by giriabhi i have written one progrm in vb but i want its output in excel but i am not able to coonect excel to vb so plz help me
Code:Private Sub Command1_Click() Dim oXLApp As Excel.Application Dim strPath As String strPath = "PathToWorksheet" Set oXLApp = New Excel.Application Set oxlBook = oXLApp.Workbooks.Open(strPath) Set Worksheet = oXLApp.Worksheets(1) oXLApp.Visible = True 'If you want to open the workbook End Sub
Comment
Comment