mitzy17 >>
http://www.jensen.dk/hans_egne/fil2.html =>
http://www.jensen.dk/Private Function UrlSplit(ByRef UrlNewFile As String, ByRef UrlFilePath As String)
Dim UrlPos As Long
If Left$(LCase(UrlNewFile), 7) = "
http://" Then
UrlNewFile = Right$(UrlNewFile, Len(UrlNewFile) - 7)
ElseIf Left$(LCase(UrlNewFile), 6) = "
ftp://" Then
UrlNewFile = Right$(UrlNewFile, Len(UrlNewFile) - 6)
End If
UrlPos = InStr(1, UrlNewFile, "/")
If UrlPos > 0 Then
UrlFilePath = Right$(UrlNewFile, Len(UrlNewFile) - UrlPos + 1)
UrlNewFile = Left$(UrlNewFile, UrlPos - 1)
End If
End Function
Private Sub Command1_Click()
Dim UrlFilePath As String
Dim UrlNewFile As String
UrlNewFile = "
http://www.jensen.dk/hans_egne/fil2.html" Call UrlSplit(UrlNewFile, UrlFilePath)
'UrlNewFile er nu
www.jensen.dk 'UrlFilePath er nu /hans_egne/fil2.html
Me.Caption = UrlNewFile & UrlFilePath
End Sub