Save As Macro

  • Thread starter Thread starter John
  • Start date Start date
J

John

When I regularly receive Excel files, make some changes
and then save them in my departments directory for
reference. This is an obscure directory that requires
file save as, new drive and drilling down several sub-
directories. Can I automate the save as by opening up the
save as pop up to a particular directory instead of the
last one used.

I would appreciate any help.
 
Hi

If you run this small macro at a time before the manual SaveAs operation, it should start
in the spesified folder:

Sub PrepareFolder()
ChDrive "D:\Sound"
ChDir "D:\Sound"
End Sub
 
The macro works great except for files that are opened and
seem to set directory on their own. The macro doesn't
work then.
-----Original Message-----
Hi

If you run this small macro at a time before the manual
SaveAs operation, it should start
 
How about:

Option Explicit
Sub testme01()

Dim myPath As String

myPath = "c:\my documents\excel"

If Right(myPath, 1) <> "\" Then
myPath = myPath & "\"
End If

With ActiveWorkbook
.SaveAs Filename:=myPath & .Name, _
FileFormat:=xlNormal
End With

End Sub

I think xl2k (and higher) wants to saveAs in the original workbook's folder.

And xl97 will go back to the current folder on the active drive.

(I bet that Harald was using xl97.)
 
That only works to save the file with the original name, I
wanted to change the path so when I hit save as it was in
the right place and I could choose a new name.

I found Places.exe, on microsoft site and it works to
change selection in save as pop up, which is just as many
mouse clicks (i.e. hit button for macro) and it is slick.

Thanks though
 
If you're using xl2002, then you don't even need Places.exe.

You can click on Tools in the File|SaveAs and see an "add to "my places""
option.

(it'll be greyed out until you select a folder.)
 
Back
Top