L lala Registered User. Local time Today, 17:35 Joined Mar 20, 2002 Messages 741 Feb 24, 2009 #1 how can i do that? i'm using mkdir to create a folder but if it's already there, i'm getting an error message so how can i first check if the folder already exists, and if not, then create it thank you!!
how can i do that? i'm using mkdir to create a folder but if it's already there, i'm getting an error message so how can i first check if the folder already exists, and if not, then create it thank you!!
boblarson Smeghead Local time Today, 14:35 Joined Jan 12, 2001 Messages 32,059 Feb 24, 2009 #2 scratched due to code error. See next post.
boblarson Smeghead Local time Today, 14:35 Joined Jan 12, 2001 Messages 32,059 Feb 24, 2009 #3 Sorry, made a mistake with that one, it needs to be: Code: If Dir("YourFolderPathHere", [COLOR="Red"]vbDirectory[/COLOR])= "" Then MkDir("YourFolderPathHere") End If
Sorry, made a mistake with that one, it needs to be: Code: If Dir("YourFolderPathHere", [COLOR="Red"]vbDirectory[/COLOR])= "" Then MkDir("YourFolderPathHere") End If
L lala Registered User. Local time Today, 17:35 Joined Mar 20, 2002 Messages 741 Feb 24, 2009 #4 thank you!!!!!!!!!!! just trying to learn something, what does VBDirectory do?
boblarson Smeghead Local time Today, 14:35 Joined Jan 12, 2001 Messages 32,059 Feb 24, 2009 #5 lala said: thank you!!!!!!!!!!! just trying to learn something, what does VBDirectory do? Click to expand... Tells it you are trying to find a FOLDER and not a file.
lala said: thank you!!!!!!!!!!! just trying to learn something, what does VBDirectory do? Click to expand... Tells it you are trying to find a FOLDER and not a file.
L lala Registered User. Local time Today, 17:35 Joined Mar 20, 2002 Messages 741 Feb 24, 2009 #6 ok, so if i WAS trying to find a file, then what would it be? vbFile?
boblarson Smeghead Local time Today, 14:35 Joined Jan 12, 2001 Messages 32,059 Feb 24, 2009 #7 lala said: ok, so if i WAS trying to find a file, then what would it be? vbFile? Click to expand... Nope, just leave it off completely: If Dir("C:\Temp\MyFile.xls")="" etc.
lala said: ok, so if i WAS trying to find a file, then what would it be? vbFile? Click to expand... Nope, just leave it off completely: If Dir("C:\Temp\MyFile.xls")="" etc.
L lala Registered User. Local time Today, 17:35 Joined Mar 20, 2002 Messages 741 Feb 24, 2009 #8 thank you so much!!!!!!