HI
i have a form which has a textbox "Ctl6" also i have a button "mkdir". I want when the "Ctl6" takes the value and if i press the "mkdir" to create a folder with the value name. and then in the new folder to create two folders every time the folders :"man" and "woman" but when the "Ctl6" is empty then to show a message.
i' ve rote this code :
Private Sub mkdir_Click()
Dim mypath
mypath = ("C:\Program Files\diet\diets\express\")
If Ctl6.AfterUpdate = "" Then
MsgBox "the box is emty", vbInformation, "wrong input"
ElseIf Ctl6.Value Is Not Null Then
MkDir (mypath & Me.[Ctl6])
MkDir (mypath & Me.[Ctl6] \ man)
MkDir (mypath & Me.[Ctl6] \ woman)
End If
End Sub
The problem that every time even if the "ctl6" is not empty i have the Msbox message in my screen and noone folder is created.
is the code correct? what's wrong?
Also can you please tell me if the mkdir command is typed ok to create a standard name subfolders after that the form creates a folder without standard name?
thanx...
i have a form which has a textbox "Ctl6" also i have a button "mkdir". I want when the "Ctl6" takes the value and if i press the "mkdir" to create a folder with the value name. and then in the new folder to create two folders every time the folders :"man" and "woman" but when the "Ctl6" is empty then to show a message.
i' ve rote this code :
Private Sub mkdir_Click()
Dim mypath
mypath = ("C:\Program Files\diet\diets\express\")
If Ctl6.AfterUpdate = "" Then
MsgBox "the box is emty", vbInformation, "wrong input"
ElseIf Ctl6.Value Is Not Null Then
MkDir (mypath & Me.[Ctl6])
MkDir (mypath & Me.[Ctl6] \ man)
MkDir (mypath & Me.[Ctl6] \ woman)
End If
End Sub
The problem that every time even if the "ctl6" is not empty i have the Msbox message in my screen and noone folder is created.
is the code correct? what's wrong?
Also can you please tell me if the mkdir command is typed ok to create a standard name subfolders after that the form creates a folder without standard name?
thanx...