Kickingkangaroos
New Member
- Joined
- Sep 2, 2009
- Messages
- 46
Hi All,
I have written a very simple macro, to perform a couple of simple actions to tidy up a sheet, which I have to run each day:
The "PERSONAL.xlsm!CSV" is another small macro which wraps quote marks ("") around the content of each populated cell in Column B.
What I am trying to do - is add a small amount of code to this above macro, which automatically saves the worksheet as a CSV file, with the file name as the current date; ideally in the standard format dd-mm-yyyy - but I'm not fussy if that is particularly complex. (EDIT: Please can you confirm how I would save this to C:\Samples Upload\ many thanks.
I understand that it is not particularly long-winded to do Save As --> CSV and type in the date - but this has to be done every day, so if it can be avoided by a simple amount of code, it would be great.
Any help would be greatly appreciated - please let me know if you need any further information.
Many thanks,
Andy
I have written a very simple macro, to perform a couple of simple actions to tidy up a sheet, which I have to run each day:
Code:
Sub SamplesUpload()
'
' SamplesUpload Macro
'
'
Range("A:A,G:G").Select
Range("G1").Activate
Selection.Delete Shift:=xlToLeft
Rows("1:8").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Application.Run "PERSONAL.xlsm!CSV"
End Sub
The "PERSONAL.xlsm!CSV" is another small macro which wraps quote marks ("") around the content of each populated cell in Column B.
What I am trying to do - is add a small amount of code to this above macro, which automatically saves the worksheet as a CSV file, with the file name as the current date; ideally in the standard format dd-mm-yyyy - but I'm not fussy if that is particularly complex. (EDIT: Please can you confirm how I would save this to C:\Samples Upload\ many thanks.
I understand that it is not particularly long-winded to do Save As --> CSV and type in the date - but this has to be done every day, so if it can be avoided by a simple amount of code, it would be great.
Any help would be greatly appreciated - please let me know if you need any further information.
Many thanks,
Andy
Last edited: