Part 2
90 DirName = strNewReportPath
100 If Dir(DirName, vbDirectory) = "" Then
110 If MsgBox("Is it OK to create a new folder in X:\Drilling\Regulatory\Regulatory Database Reports\" & UserLogin & "\GISLatLong Report? (recommended yes)", vbOKCancel) = vbOK Then
120 DirName = UserPath
130 MkDir DirName
140 Err.Clear
150 Call LogUsage("GISLatLong Report", "cmdAPDExcelReports", "line MkDir")
160 Else
170 MsgBox "Create new folder cancelled. Folder not created.", vbOKOnly, "Report Cancelled, must allow folder to be created"
180 Exit Function
190 End If
200 Else
'MsgBox "The folder already exists..." & Chr(10) & "Please check the directories using Windows Explorer.", vbOKOnly
' if it exist, don't bother letting the user know
220 End If
If you are newly registered, I encourage you to give anyone who helps you a "thanks". You will find that in general, they will be willing to help more often.
Happy Holidays
90 DirName = strNewReportPath
100 If Dir(DirName, vbDirectory) = "" Then
110 If MsgBox("Is it OK to create a new folder in X:\Drilling\Regulatory\Regulatory Database Reports\" & UserLogin & "\GISLatLong Report? (recommended yes)", vbOKCancel) = vbOK Then
120 DirName = UserPath
130 MkDir DirName
140 Err.Clear
150 Call LogUsage("GISLatLong Report", "cmdAPDExcelReports", "line MkDir")
160 Else
170 MsgBox "Create new folder cancelled. Folder not created.", vbOKOnly, "Report Cancelled, must allow folder to be created"
180 Exit Function
190 End If
200 Else
'MsgBox "The folder already exists..." & Chr(10) & "Please check the directories using Windows Explorer.", vbOKOnly
' if it exist, don't bother letting the user know
220 End If
If you are newly registered, I encourage you to give anyone who helps you a "thanks". You will find that in general, they will be willing to help more often.
Happy Holidays