Public Function Online(ByVal strHtml As String) As String Dim i As Long Dim lStart As Long Dim strFind1 As String Dim strFind2 As String
strFind1 = "Lige nu er der: " '<- Start med at finde... strFind2 = " " '<- Find hen til space fra start string
lStart = InStr(1, strHtml, strFind1, vbTextCompare) If Not lStart = 0 Then lStart = (lStart + Len(strFind1)) For i = lStart To Len(strHtml) If Mid(strHtml, i, 1) = strFind2 Then Online = Mid(strHtml, lStart, (i - lStart)) Exit For End If Next i End If End Function
Private Sub Command1_Click() Me.Caption = Online(Text1.Text) End Sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.