Save as macro

From: Logan (anonymous_at_discussions.microsoft.com)
Date: 03/10/04


Date: Wed, 10 Mar 2004 11:21:58 -0800

Here is what I've been able to workout so far but can't
find out where to insert the change directory command
I have set up a folder called 'New Files' on my 'C' drive,
this is were I would like to save them at.

Private Sub CommandButton1_Click()
Dim FName1, FName2, Fullname
FName1 = "CK0"
FName2 = Range("AU2").Value & " "
FName3 = Range("J4").Value
Fullname = FName1 & FName2 & FName3
Application.DisplayAlerts = False
    ActiveWorkbook.SaveAs Fullname, FileFormat _
        :=xlNormal, CreateBackup:=False
        MsgBox "Saved to " & CurDir
End Sub

>-----Original Message-----
>I would like to create a macro that would take the
>information from two different cells and use them as the
>file name, then save the file as an .xls in another folder.
>
>The cells I would like to use are named, Surname and
>filenumber.
>
>I am then going to create a command button on the toolbar
>so that all the employees have to do is click the 'Save As'
>button.
>
>I have no problem with creating the shortcut bottons and
>assigning the macro to it. It just that I am very new to
>VBA and not sure how to write the code, for the save as part.
>
>Any help would be appreciated
>.
>