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 |
creating folder
Lawson wrote:
i want my program to save in a certain area of our server, but how do i make it create the final folder? See MkDir in VBA help. Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
All times are GMT +1. The time now is 04:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com