excel vba - problems saving?

C

chief

In my userform 1 I have ......

ActiveWorkbook.Save
Sheet1.SaveAs FileName:="Q:\RETAIL SALES POs MAGGIE\"
Range("K5").Value
ActiveWorkbook.Close

Is there a way to set up a code so that it will save it as cell C
(this is where the clients name goes) as well as cell K5. So that i
would look like this ex. Joe Schmo - 1, etc. Furthermore, is there
way to set up seperate folders in the "Q:\RETAIL SALES POs MAGGIE" Driv
by client name, and then set up a saving code that will save th
appropriate file into the appropriate folder. For example, you put jo
schmo in c9, it saves the file in Q drive in "Joe Schmo" folder an
saves it as Joe Schmo - 1.

Is this possible
 
J

Jim

Hello£¬the following program maybe help you:

Sub SaveFileTest()

Dim strPath As String
strPath = "Q:\RETAIL SALES POs MAGGIE\" & Sheet1.Range("C9").Value

On Error GoTo IgnoreError

MkDir strPath

IgnoreError:
Dim filename As String
filename = strPath & "\" & Sheet1.Range("C9").Value & "-" &
Sheet1.Range("K9").Value
Sheet1.SaveAs filename

End Sub

_______________________________________________________________
 
Top