I have several files that I need to save as Distribution files that
are in different folders. The job requires saving the files as
values (to eliminate the formulas of the original file), adding DIST
to the file name and leaving them in the same folder as the original
file. Everything works except it continues to save the files to my
desktop. Ive searched everywhere on how to fix but changing the
drive to thisworkbook.path or activeworkbook.path doesnt help. here
is the coade I have so far. I have been testing it using a macro on
a workbook saved on my desktop. Could this be the probelm? Do I
have to have it in personal macro WB?
Dim DISTNAME As Variant
DISTNAME = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) -
4) & " DIST" & ".xls"
Application.DisplayAlerts = False
Application.ScreenUpdating = False
ChDir (ActiveWorkbook.Path)
Sheets.Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
ActiveWorkbook.SaveAs DISTNAME