Please who can help me.....
I want simply: start excel, pase data in row and save in a excel file all this with vb6.....
Is there a very short way to do this ??
Printable View
Please who can help me.....
I want simply: start excel, pase data in row and save in a excel file all this with vb6.....
Is there a very short way to do this ??
first, you have to add the references : Microsoft Excel 9.0 object library.
after, you just have to do something like this:
Dim ExApp As Excel.Application
Dim ExWbk As Excel.Workbook
Dim ExSheet As Excel.Worksheet
Dim ExRng As Excel.Range
Set ExApp = CreateObject("Excel.Application")
Set ExWbk = oXL.Workbooks.Add
Set ExSheet = oWB.ActiveSheet
ExSheet.Cells(1, 2).Value = "Excel"
ExApp.Visible = True
ExApp.UserControl = True
Set oExRng = Nothing
Set ExSheet = Nothing
Set ExWbk= Nothing
Set ExApp = Nothing
if you need help again... Just ask!!!
scuse me... replace this:
Set ExApp = CreateObject("Excel.Application")
Set ExWbk = oXL.Workbooks.Add
Set ExSheet = oWB.ActiveSheet
by this
Set ExApp = CreateObject("Excel.Application")
Set ExWbk = ExApp.Workbooks.Add
Set ExSheet = ExWbk.ActiveSheet