Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim oExcel As Object
- Dim oBook As Object
- Dim oSheet As Object
- Private Sub ExcelButton_Click()
- 'Start a new workbook in Excel
- Set oExcel = CreateObject("Excel.Application")
- oExcel.Visible = True
- Set oBook = oExcel.Workbooks.Add
- 'Add data to cells of the first worksheet in the new workbook
- Set oSheet = oBook.Worksheets(1)
- oSheet.Range("A1").Value = "Nivo rezervoara"
- oSheet.Range("B1").Value = Fix32.Fix.NIVO_REZERVOARA.F_CV
- 'Save the Workbook and quit Excel
- oBook.SaveAs "C:\test_01.xls"
- oExcel.Quit
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment