Hello all!
I'm having problems opening and writing into an excel file, the code i've got is the following:
Dim xlApps As New Excel.Application
Dim xlwrkbs As Excel.workbook
Dim xlsht As Excel.worksheet
Set xlwrkbs = GetObject("Text.xls")
Set xlsht = xlwrkbs.worksheet(1)
xlsht.cells(1, "A") = "testing"
xlwrkbs.Save
But I get an error in the first line, saying user-defined type not defined...
How could I create a new file? Anyone has an example??
Thanks in advance!
I'm having problems opening and writing into an excel file, the code i've got is the following:
Dim xlApps As New Excel.Application
Dim xlwrkbs As Excel.workbook
Dim xlsht As Excel.worksheet
Set xlwrkbs = GetObject("Text.xls")
Set xlsht = xlwrkbs.worksheet(1)
xlsht.cells(1, "A") = "testing"
xlwrkbs.Save
But I get an error in the first line, saying user-defined type not defined...
How could I create a new file? Anyone has an example??
Thanks in advance!