Shiftyshell
01-24-2021, 04:21 AM
Hi all,
I´ve a problem to create folder in specified path using multiple cells values. I used below code:
Option Explicit
Sub MakeFolder_Rev1()
Dim rngA As Range, FolderLocation As String, FolderName As String
FolderLocation = "I:\01-Reklamace\Reklamace"
If Selection.Value <> "" Then
End If
FolderName = Selection.Value
If Dir(FolderLocation & FolderName, vbDirectory) = vbNullString Then
MkDir (FolderLocation & FolderName)
End If
End Sub
I need also use values from another cells, not only from Selection.Value.
For example:
Selectio.Value is in D1, I need use also values from H1 (folder already exists) and also copy one Excel file to created folder.
Thank you for your help in advance.
I´ve a problem to create folder in specified path using multiple cells values. I used below code:
Option Explicit
Sub MakeFolder_Rev1()
Dim rngA As Range, FolderLocation As String, FolderName As String
FolderLocation = "I:\01-Reklamace\Reklamace"
If Selection.Value <> "" Then
End If
FolderName = Selection.Value
If Dir(FolderLocation & FolderName, vbDirectory) = vbNullString Then
MkDir (FolderLocation & FolderName)
End If
End Sub
I need also use values from another cells, not only from Selection.Value.
For example:
Selectio.Value is in D1, I need use also values from H1 (folder already exists) and also copy one Excel file to created folder.
Thank you for your help in advance.