Public Function StrParse(Source As String, PChar As String) As Variant \'This Function take the \'Source\' parameter and a separater charater \'and creates an Array with each element containing a string ending \'where each PChar\' was found. \'This Function works great for parsing command lines and/or \'Nested Path Strings.
Dim pos As Integer, i As Integer \'Make sure we get the last element in string. Source = Left(Source, Len(Source) - 1) + PChar \'begin a loop Do
\'find the first separating PChar pos% = InStr(Source, PChar)
\'if there\'s one, then... If pos% Then ReDim Preserve TmpArray(i%) \'extract the string up to the PChar TmpArray(i%) = Trim(Left$(Source, pos% - 1))
\'and remove that from the Source string, \'so it won\'t be checked again Source = Mid$(Source, pos% + 1, Len(Source)) i% = i% + 1 End If Loop Until Source = \"\" Or Source = Chr(0) \'Return a New Populated Array. StrParse = TmpArray End Function
excel har jo 2 m[de man kan eksportere sine data paa. enten semikolon eller tabulator. med semikolon kommer der et mellemrum ind f0r og efter semikolon: \" 213 ; 123 \". Med tabulator er der \"123[tab]213\".
Nåå .. okay .. så skal du nok gøre det på en lidt anden måde da jeg ikke er sikker på om Input #1, var slutter ved ; .. jeg prøver lige at lave noget der funker OK
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.