Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What coding can I use or what ways can I use so that each workbooks path is
unique, meaning that not one workbook path is the same e.g. C:\220210\220210.xls, C:\220211\220211.xls... Thanks Bob |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
myNum = 220110
Do fFound = fileexists("C:\220210\" & myNum & ".xls" if fFiund Then myNum = myNum + 1 Loop Until Not fFound Function FileExists(sFilename As String) As Boolean FileExists = Dir(sFilename) < "" End Function -- HTH RP (remove nothere from the email address if mailing direct) "Bob" wrote in message ... What coding can I use or what ways can I use so that each workbooks path is unique, meaning that not one workbook path is the same e.g. C:\220210\220210.xls, C:\220211\220211.xls... Thanks Bob |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal lpPath As String) As Long MakeSureDirectoryPathExists "c:\abc\def\ghi\jkl\" NOTE: Path must end with \ "Bob" wrote: What coding can I use or what ways can I use so that each workbooks path is unique, meaning that not one workbook path is the same e.g. C:\220210\220210.xls, C:\220211\220211.xls... Thanks Bob |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is code I've been using to check if exist and create folder if not
Dim FsO As Object Dim FolD As String FolD = "your\folder\path\goes\here" Set FsO = CreateObject("Scripting.FileSystemObject") If Not FsO.FolderExists(FolD) Then FsO.CreateFolder (FolD) "Bob" wrote in message ... What coding can I use or what ways can I use so that each workbooks path is unique, meaning that not one workbook path is the same e.g. C:\220210\220210.xls, C:\220211\220211.xls... Thanks Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to check if a file exists in an ftp folder | Excel Discussion (Misc queries) | |||
Test if folder exists, create if it doesn't? | Excel Programming | |||
Test if a folder exists, create if it doesn't? | Excel Programming | |||
Test if a folder exists | Excel Programming | |||
Checking to see if Folder exists | Excel Programming |