SaveAS Question

RaunLGoode

Registered User.
Local time
Today, 05:54
Joined
Feb 18, 2004
Messages
122
I have an Excel workbook that several groups use as a template. I don't want the users to accidently save their (completed) form over the template. I have a form that is visable OnOpen that requests a new file name, then saves the new file in a specific folder for each group. I would prefer to have this form open a SaveAs window that points to a specific folder, but allows the users to browse to a different folder if they wish.

What I have tried is:

Dim ToolName As String
ToolName = tbToolName.Value
ActiveWorkbook.SaveAs: "\\Server name\Path" + ToolName + ".xls"

While the file saves to the specified folder, I don't get the SaveAs Window. I have searched this and other sites, but I can't find an example close enough to tweak to fit my need. I would really appreciate the help.
 
Here's something to get you started...
Code:
Public Function SaveIt()
    
    Dim fd As FileDialog
    
    Set fd = Application.FileDialog(msoFileDialogSaveAs)
    
    fd.InitialFileName = "c:\MyFileName.xls"
    fd.Show

    Set fd = Nothing

End Function
 
Thanks a lot!!

Sergeant,
That code was just what I needed. I only had to nudge it (gently) and it worked like a dream.
Again, Thank you
 

Users who are viewing this thread

Back
Top Bottom