Я использую код VBA для создания новой папки в каталоге. Я хочу получить имя новой папки из выбранной ячейки. Любые идеи, как я могу это сделать, пожалуйста?
Вот код, который у меня есть.
If Target.Column = Range("B1").Column Then
  If Target.Row > 7 Then
'Variable definitions
Dim FolderListRange As Range
Dim FolderRange As Variant
Dim FolderName As String
Dim ParentFolderPath As String
On Error GoTo Handle
    ' Set the Folder where the individual folders should be created
    ParentFolderPath = "\\UKSH000-FILE06\purchasing\New Supplier Set-Ups"
    Set FolderListRange = Range("B" & Target.Row).SpecialCells(xlCellTypeConstants)
    For Each FolderRange In FolderListRange
        FolderName = ParentFolderPath & "\" & FolderRange.Value
        If FileSystem.Dir(FolderName, vbDirectory) = vbNullString Then
            FileSystem.MkDir FolderName
        End If
Continue:
    Next
Handle:
  End If
  End If
