Hi
I need to go to the last entry in a column and use this as myVar. I then need to check if a folder exsists with this name, and if it does not, create one.
Then move up the list until I get to the point where the variable does exist within the folder name and exit.
I have managed to do the code for creating the folder, but I am stuck on the code to check if this folder exists first or not and exiting if it does.
The code so far is:-
Dim myVar As String
Dim mPath As String
myVar = ActiveCell.Value
mPath = "P:\Spreadsheet Project\Testfolder\04_" & myVar
MkDir mPath
'will copy time & disb workbook into new folder
filecopy "P:\Spreadsheet Project\Time\Trial Sheet.xls", "P:\Spreadsheet Project\Testfolder\04_" & myVar & "\Trial Sheet.xls"
End Sub
Can anyone help?
Thanks
Jo
I need to go to the last entry in a column and use this as myVar. I then need to check if a folder exsists with this name, and if it does not, create one.
Then move up the list until I get to the point where the variable does exist within the folder name and exit.
I have managed to do the code for creating the folder, but I am stuck on the code to check if this folder exists first or not and exiting if it does.
The code so far is:-
Dim myVar As String
Dim mPath As String
myVar = ActiveCell.Value
mPath = "P:\Spreadsheet Project\Testfolder\04_" & myVar
MkDir mPath
'will copy time & disb workbook into new folder
filecopy "P:\Spreadsheet Project\Time\Trial Sheet.xls", "P:\Spreadsheet Project\Testfolder\04_" & myVar & "\Trial Sheet.xls"
End Sub
Can anyone help?
Thanks
Jo