Question: how to export data from datagrid to excel in vb6?
Answer: private sub cmdexport_click() Dim oExcel As Object. Dim oBook As Object. Dim oSheet As Object. Set oExcel = CreateObject("Excel.Application") Set oBook = oExcel.Workbooks.Add. Set oSheet = oBook.Worksheets(1) On Error GoTo errcode.