OUFanINkansas
New Member
- Joined
- Nov 1, 2017
- Messages
- 1
I am attempting to create a folder structure utilizing a dialog box and command button because the folder name will be custom. However, I would like create a folder structure under the unique folder name. I have the following to create the folder required, but am running into trouble recalling the folder name entered in the dialog box to add a folder structure under that folder. Please let me know if further information is required. Thanks!
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
'FILESYSTEMOBJECT/SCRIPTING
Dim FSO As Scripting.FileSystemObject
Set FSO = New Scripting.FileSystemObject
Dim X As String
X = Me.TxtPropNumber.Value
Dim P As String
P = "X:\Proposals\2017"
If FSO.FolderExists(P) Then
FSO.CreateFolder (P & "" & X)
Else
MkDir (P)
End If
'clear the data
TxtPropNumber = ""
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
'FILESYSTEMOBJECT/SCRIPTING
Dim FSO As Scripting.FileSystemObject
Set FSO = New Scripting.FileSystemObject
Dim X As String
X = Me.TxtPropNumber.Value
Dim P As String
P = "X:\Proposals\2017"
If FSO.FolderExists(P) Then
FSO.CreateFolder (P & "" & X)
Else
MkDir (P)
End If
'clear the data
TxtPropNumber = ""
End Sub