Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sPath$ = "c:\Temp"
If Dir(sPath, vbDirectory) = "" Then MkDir (sPath) End I -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Note: from Tom Ogilvy
sPath = "C:\Data" if Dir(sPath,vbDirectory) < "" then if getAttr(sPath) = vbDirectory then msgbox sPath & " exists" end if end if You need to do the getAttr because Dir checks for both a file and a directory when you do Dir(sPath,vbDirectory), so it could be fooled by a file named C:\data with no extension. -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "mudraker " wrote in message ... sPath$ = "c:\Temp" If Dir(sPath, vbDirectory) = "" Then MkDir (sPath) End If --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a macro which automatically saves the workbook to the path specified in one of the cells - defined as "fname" within the macro. If this path does not exist on someones drive is there a way of creating the required folders? TIA Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set default directory for saving files | Excel Discussion (Misc queries) | |||
How to change options for saving when old directory(network) gone | Setting up and Configuration of Excel | |||
Saving to root directory | Excel Discussion (Misc queries) | |||
Saving into new directory | Excel Discussion (Misc queries) | |||
Saving to same directory | Excel Programming |