G
Guest
i have inherited the following migrated vb6 code (vb2005)
but i DONT get the "not all paths return a value" squiggly - is this a
'feature' of on error goto?
Private Function CreateFolder(ByVal sFileName As String) As Boolean
On Error GoTo Errors
'Create it if necessary
If Directory.Exists(sFileName) = False Then
Directory.CreateDirectory(sFileName)
End If
'Succeeded in creating a folder
CreateFolder = True
Errors:
End Function
but i DONT get the "not all paths return a value" squiggly - is this a
'feature' of on error goto?
Private Function CreateFolder(ByVal sFileName As String) As Boolean
On Error GoTo Errors
'Create it if necessary
If Directory.Exists(sFileName) = False Then
Directory.CreateDirectory(sFileName)
End If
'Succeeded in creating a folder
CreateFolder = True
Errors:
End Function