Hi I am pretty new to VBA, I have a spreadsheet that I am using called "FX Master Worksheet.xlsm" - we can just refer to it as the source file going forward. In it there are two worksheets (one called "TDB" and one called "MTS").

Every day I use the source file and then have to save it as a copy and rename it "Today's FX sheet.xlsx" - we can call it the new file going forward.


Then I copy the "MTS" worksheet from the new file and save it as a copy as a csv file named "Today's MTS file.csv".


I am trying to insert VBA code into my existing macro but all I keep doing is renaming the source file instead of the new xlsx or csv files. Can anyone help?

I will insert my current code and maybe you can tell me what and where I should insert. Stumped! I just want to end up with the source file untouched, and the new xlsx and csv files renamed as above and saved in the location "G:\FX\"

PS if I didn't notate the code correctly let me know. I don't know code but copied what i could from other sheets I found in similar files and tried to adapt to suit my requirements.




Sub CreateFiles()
'
    ' CreateFiles Macro
'

    Sheets("TDB").Select
          ActiveWorkbook.Save

    Sheets(Array("TDB", "MTS")).Select
    Sheets(Array("TDB", "MTS")).Copy
    Cells.Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
   
   
   Sheets("MTS").Activate
   
       Cells.Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

    

  
    Rows("7:7").Select
    
    Application.CutCopyMode = False
    
    
    
       

    
    Sheets("TDB").Activate
Sheets("TDB").Select
 Range("A1").Select
    

    
 Sheets("MTS").Copy




Windows("FX Master Worksheet.xlsm").Activate
    
    
    Sheets("TDB").Select
    Range("A17").Select
    

End Sub