Anyone know why the code below doesn't work?
I have an Excel workbook with a form and a module.
The form contains a button that contains:
In the module I have:
Private Sub startExport()
Dim thePath, theFile As String
thePath = Application.ThisWorkbook.Path
theFile = Application.ThisWorkbook.Path & "\" & frmProject.txtProject & "Import.csv"
writeProjectLine thePath, theFile
The code gives a "ByRef argument type mismatch" error and highlights the variable "thePath" that is shown in bold above.