Save as macro
From: Logan (anonymous_at_discussions.microsoft.com)
Date: 03/10/04
- Next message: David Smith: "RE: Solver Delay: Additional notes."
- Previous message: cw_lynn: "Mass Emailing from Excel Through Outlook w/vba"
- In reply to: Logan: "Save as macro"
- Next in thread: Logan: "Save as macro"
- Reply: Logan: "Save as macro"
- Messages sorted by: [ date ] [ thread ]
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
>.
>
- Next message: David Smith: "RE: Solver Delay: Additional notes."
- Previous message: cw_lynn: "Mass Emailing from Excel Through Outlook w/vba"
- In reply to: Logan: "Save as macro"
- Next in thread: Logan: "Save as macro"
- Reply: Logan: "Save as macro"
- Messages sorted by: [ date ] [ thread ]