Hi. Total newbie. I can extract some data from my database, but I need to save it as a .csv file using a variable to make the filename unique (based on some of the content). I can do everything except insert the variable as teh file name. Can anyone assist please?
Here's the code in question: As you can see, the code always saves the file as "\AllData Test.CSV. I need the file name to be the variable called "NameFileAllData" & .csv
Application.DefaultFilePath = "C:\Users\owner\blah\blah\blah"
myFile = Application.DefaultFilePath & "\AllData Test.CSV"
Any help would be appreciated.
Many thanks
Here's the code in question: As you can see, the code always saves the file as "\AllData Test.CSV. I need the file name to be the variable called "NameFileAllData" & .csv
Application.DefaultFilePath = "C:\Users\owner\blah\blah\blah"
myFile = Application.DefaultFilePath & "\AllData Test.CSV"
Any help would be appreciated.
Many thanks