Skip to content

Instantly share code, notes, and snippets.

View stevehenderson's full-sized avatar

Steve Henderson stevehenderson

View GitHub Profile
@stevehenderson
stevehenderson / gist:5581467
Last active December 17, 2015 08:39
VBA code for saving a csv to disk
Sub SendResults()
Dim OutApp As Object
Dim OutMail As Object
Dim currentPath As String
currentPath = Application.ActiveWorkbook.Path
currentPath = "\\se\ABETWorking\SEN0_CapstoneDA"
Dim csvPath As String
Dim emailBody As String
@stevehenderson
stevehenderson / writeCSV
Last active December 17, 2015 08:39
VBA code to write worksheet calues to a CSV
Function writeCSV(csvPath As String) As String
'Create a CSV
Dim i As Integer
Dim lastUsedColumn As Integer
Dim done As Boolean
lastUsedColumn = 9
i = 1
done = False
While Not done