Hi. I have a button on a Access form which opens a folder in explorer using the following code:
Private Sub Command12_Click()
Dim ProjPath
ProjPath = "Z:\" & Me.PolicyNo.Value
Shell "C:\WINDOWS\explorer.exe """ & ProjPath & "", vbNormalFocus
End Sub
This works great. What I would like it to do is to create a folder with the same name as the PolicyNo field if it does not already exist in the mapped Z drive, and then open it. Obviously if the folder already exists it would just open it as it does now.
Is this possible?
Many thanks
John
Start Free Trial