I try to open excel file in visual basic 6. Somebody gave me this code to open excel file. But when i create a my new form and type this code. An error occured for this code
Private Sub Form_Load()
Dim x_app As Excel.Application
Dim x_wbk As Excel.Workbook
Dim x_wsh As Excel.Worksheet
Set x_app = New Excel.Application
Set x_wbk = x_app.Workbooks.Add
Set x_wsh = x_wbk.Worksheets.Add
x_wsh.Cells(1, 1) = 50
x_app.Visible = True
End Sub
When I declare
Dim x_app as Excel.Application in my new form it is not accepted It change to Dim x_app as Excelfrm.
How to add Excel in my object browser. Maybe it is the solution to open my excel file in visual basic 6.
Anybody can help me and I appreaciate it alot. Step by step instruction to clearly open excel file in vb6 is served me best.
Thank you in advance.