Thread: creating folder
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lawson Lawson is offline
external usenet poster
 
Posts: 15
Default creating folder

i want my program to save in a certain area of our
server, but how do i make it create the final folder? (in
case it matters the program is below)

Private Sub CommandButton11_Click()
If Range("k265") = 1 Then
If Range("h251") = "Job #" Then Exit Sub
ActiveWorkbook.SaveAs Filename:="\\Cpi-server-1
\estimate\Quotes\EST" & Range("q262") & "000\EST" & Range
("q262") & Range("q263") & "00\" & Range("h251")
& ".xls", FileFormat:=xlNormal, Password:="",
WriteResPassword:="", ReadOnlyRecommended:=False,
CreateBackup:=False
Else
'For Each w In Application.Workbooks: w.Activate:
If Range("q297") = 0 Then
MsgBox "This file is not linked.": Exit Sub
Else
If Range("q292") = 1 Then
MsgBox ""
ActiveWorkbook.SaveAs Filename:="\\AAA-server-1
\estimate\Quotes\EST" & Range("q262") & "000\EST" & Range
("q262") & Range("q263") & "00\" & Range("q261") & "\" &
Range("h251") & ".xls", FileFormat:=xlNormal,
Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False
Else
ActiveWorkbook.SaveAs Filename:="\\AAA-server-1
\estimate\Quotes\EST" & Range("q262") & "000\EST" & Range
("q262") & Range("q263") & "00\" & Range("h251")
& ".xls", FileFormat:=xlNormal, Password:="",
WriteResPassword:="", ReadOnlyRecommended:=False,
CreateBackup:=False
End If
End If
'Next w
End If