alvarogueva
Registered User.
- Local time
- Today, 05:56
- Joined
- Nov 5, 2016
- Messages
- 91
Well;
Hello there.
I have someone who code me once a button to create a Folder in a specific location.
This is the Code:
"Private Sub BtnCreateCustomerFolder_Click()
Dim strtemp As String
Dim strPathPrefix As String
Dim strPathSuffix As String
strPathPrefix = "\\*******\Database\Customers\"
strPathSuffix = "\Docs\"
If Me.CustomerName.Value & "" = "" And Me.CustomerLastName.Value & "" = "" Then
MsgBox "Customer Name must be filled in first"
Else
strtemp = strPathPrefix & Replace((Me.CustomerName.Value & ""), "'", "") & Replace((Me.CustomerLastName.Value & ""), "'", "")
If Len(Dir(strtemp, vbDirectory)) = 0 Then
MkDir strtemp
End If
strtemp = strtemp & strPathSuffix
If Len(Dir(strtemp, vbDirectory)) = 0 Then
MkDir strtemp
End If
Shell "C:\WINDOWS\explorer.exe """ & strtemp & "", vbNormalFocus
End If
End Sub"
Does anyone know if I need to create a new one, or just add in here more stuff??
Thanks!
Hello there.
I have someone who code me once a button to create a Folder in a specific location.
This is the Code:
"Private Sub BtnCreateCustomerFolder_Click()
Dim strtemp As String
Dim strPathPrefix As String
Dim strPathSuffix As String
strPathPrefix = "\\*******\Database\Customers\"
strPathSuffix = "\Docs\"
If Me.CustomerName.Value & "" = "" And Me.CustomerLastName.Value & "" = "" Then
MsgBox "Customer Name must be filled in first"
Else
strtemp = strPathPrefix & Replace((Me.CustomerName.Value & ""), "'", "") & Replace((Me.CustomerLastName.Value & ""), "'", "")
If Len(Dir(strtemp, vbDirectory)) = 0 Then
MkDir strtemp
End If
strtemp = strtemp & strPathSuffix
If Len(Dir(strtemp, vbDirectory)) = 0 Then
MkDir strtemp
End If
Shell "C:\WINDOWS\explorer.exe """ & strtemp & "", vbNormalFocus
End If
End Sub"
Does anyone know if I need to create a new one, or just add in here more stuff??
Thanks!