Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using excel 2003. In my workbook the user can enter the directory they
want to use for saving a file. They enter the path in cell B200. I want to create the entered directory if it doesn't already exist. I am using this code and it works if the directory doesn't exist, but if it already exists, the program shuts down. I would appreciate any help. Strappend and str3 will be combined for the file name. Dim strappend As String Dim strpath As String Dim str3 As String strappend = ActiveSheet.Range("j8").Value strpath = ActiveSheet.Range("b200").Value str3 = ActiveSheet.Range("c8").Value If Dir(strpath) = "" Then MkDir strpath fsavename = strpath & strappend & str3 & ".xls" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Windows Message when Directory Already Exist | Excel Programming | |||
Copy Worksheet to a new Workbook creating if it doesn't exist and add more Worksheets if it does exist | Excel Programming | |||
Save to directory and create if not exist | Excel Programming | |||
Creating a macro that lists directory names within a directory.... | Excel Programming | |||
How to check if a folder/directory exist using VBA | Excel Programming |