Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SaveAs dialog to open in specific directory

Status
Not open for further replies.

VBAveenker

Technical User
May 23, 2007
10
US
Hi -

still a novice, but getting it...

Creating a macro to Save a workbook in a specific directory. Trying to save myself time because the default directory the open upon SaveAs is the directory where the current workbook is saved, not the directory where I want it saved (and that directory is buried, hence the time saving macro). My code below works on everything except opening to the correct directory. Any hints? Thanks!

Sub Save_As()
'
' Save_As Macro
' Macro recorded 5/25/2007 by
'

'
With Application.Dialogs(xlDialogSaveAs)
.Parent = "\\FS2\Shared\Client Files\"
.Show ("Closing Book Checklist " & Range("C3") & " " & Range(" C6 "))
End With


End Sub
 
You may consider the GetSaveAsFilename method:
varFilename = Application.GetSaveAsFilename("\\FS2\Shared\Client Files\Closing Book Checklist " & Range("C3") & " " & Range("C6"))
If varFilename <> False Then
ActiveWorkbook.SaveAs varFilename
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Beautiful! It's exactly what I was looking for. I had played around with the GetSaveAsFileName, but couldn't quite understand how best to implement it. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top