I want my VB program to create a csv file and then i want to write to my csv file and have the fields written in particular columns. This is what I have so far
Dim oCSV As Object
Dim oBook As Object
Dim oSheet As Object
'Start a new workbook in CSV.
oCSV = CreateObject("CSV.Application")
oBook = oCSV.Workbooks.Add
'The inputs are written to the CSV file
oSheet = oBook.Worksheets(1)
oSheet.Range("D4").Value = "ProjectTextBox.Text"
oSheet.Range("B1").Value = "NotesTextBox.Text"
'oSheet.Range("A2").Value = "Doe"
'oSheet.Range("B2").Value = "John"
'Save the Workbook and quit Excel.
oCSV.ActiveWorkbook.SaveAs("C:\Program Files\CSV\doc1")
oSheet = Nothing
oBook = Nothing
oCSV.Quit()
oCSV = Nothing
GC.Collect()
Can someone help me please
Dim oCSV As Object
Dim oBook As Object
Dim oSheet As Object
'Start a new workbook in CSV.
oCSV = CreateObject("CSV.Application")
oBook = oCSV.Workbooks.Add
'The inputs are written to the CSV file
oSheet = oBook.Worksheets(1)
oSheet.Range("D4").Value = "ProjectTextBox.Text"
oSheet.Range("B1").Value = "NotesTextBox.Text"
'oSheet.Range("A2").Value = "Doe"
'oSheet.Range("B2").Value = "John"
'Save the Workbook and quit Excel.
oCSV.ActiveWorkbook.SaveAs("C:\Program Files\CSV\doc1")
oSheet = Nothing
oBook = Nothing
oCSV.Quit()
oCSV = Nothing
GC.Collect()
Can someone help me please