Public Function GetFileName(FilePath As String)
Dim sChar As String
Dim sBuffer As String
Dim i As Integer
'Separerar filnamn från sökvägen:
For i = Len(FilePath) To 1 Step -1
sChar = Mid(FilePath, i, 1)
If sChar <> "\" Then
sBuffer = sChar & sBuffer
Else
Exit For
End If
Next i
GetFileName = sBuffer
End Function