LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 124
Default Creating a new folder that does not already exsit.

I don't know what it is, I have tried multiple variations of this code and
still cannot get it to function.

Sub SaveAndClose1()
Path = "C:\Forms\F-50"
If Dir(Path, vbDirectory) = vbNullString Then
MkDir "C:\Forms\F-50"
End If
ActiveWorkbook.SaveAs Filename:="C:\Forms\F-50\" & Range("C6").Value &
Format(Date, "ddmmmyyyy") & ".xls"
'ActiveWorkbook.Close
End Sub

Attempting to to have a button that upon clicking will save the workbook to
C:\Forms\F-50. No computer that this will be used on will have this folders.
So they need to be created but if they have already done so, i want it just
to save there. Like I said I've used a lot of different variations and still
no go. Please Advise.

Your lovable stressed out intern.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i change my default working folder to a networked folder? wizard1154 Excel Discussion (Misc queries) 4 April 18th 07 07:29 PM
Creating a List of the files in a folder in excel [email protected] Excel Discussion (Misc queries) 2 November 27th 06 08:39 PM
How to decide folder-depth or How to select more folders/subfolders (folder-tree) ? Subteam Excel Discussion (Misc queries) 2 May 7th 06 08:14 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Excel Discussion (Misc queries) 1 January 24th 06 03:28 PM
creating an XLS file from " files" data in a Folder Edwin Mashiringwani Excel Discussion (Misc queries) 2 November 19th 05 04:45 PM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"