yorkshirelad
Board Regular
- Joined
- Aug 18, 2003
- Messages
- 100
Apologies for posting again but I urgently need to get this resolved.
I need to import a CSV file (test.csv) into a workbook (data.xlsm) which I have open.
They are both in the same folder.
I cannot use the full directory path as the macro needs to be used on other pcs so the commands must be relative.
I had a suggested answer which brings the data in but it uses a new file rather than the workbook that I have open.
It needs to import into the existing workbook as I have other data in the workbook and macros linked to it
The suggested solution is below but I need it to work as noted above
Sub import_csv_file()
Dim file As String
file = "test.csv"
Workbooks.Open (file)
End Sub
Any assistance would be greatly appreciated.
I need to import a CSV file (test.csv) into a workbook (data.xlsm) which I have open.
They are both in the same folder.
I cannot use the full directory path as the macro needs to be used on other pcs so the commands must be relative.
I had a suggested answer which brings the data in but it uses a new file rather than the workbook that I have open.
It needs to import into the existing workbook as I have other data in the workbook and macros linked to it
The suggested solution is below but I need it to work as noted above
Sub import_csv_file()
Dim file As String
file = "test.csv"
Workbooks.Open (file)
End Sub
Any assistance would be greatly appreciated.