I have Workbook 'A' (WB 'A'). WB 'A' contains a macro which creates a .csv file containing relevant information from WB 'A'. WB 'A' contains a second macro which is supposed to force the .csv file to save to the same location as WB 'A' is currently saved. The .csv file should save to the same location as WB 'A' regardless of how many times I have changed the location of WB 'A'. However, the .csv file is not saving to the correct location. It always saves to my 'My Documents' folder. I am completely illiterate in these matters. I have posted the macro below and I have tried to follow all forum rules. Any help is greatly appreciated.
Sub DT1331_DTNA()
'
' DT1331_DTNA Macro
'
'
Range("I8").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
ActiveWorkbook.Path & "DT1331_DTNA.csv", _
FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
Bookmarks