Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21090

Splitting text into array, then looping through array

$
0
0
Hello all,

Seems I have more array questions!

I have this code, which doesn't quite work. Basically it loads a string and splits it. It then loads each of the splits into an array.

I am then trying to load from that array. Problem is, well, the code doesn't quite work. I don't know how to loop or load from the array. I could create a timer that just loads each array + 1 until it runs out of data and bombs the app.

This is what I'm trying to do:
Code:

Dim strSplit() As String
strSplit = Split(textToSplit, "|")
 
Set smedia = mediaPlayer.mediaCollection.Add(activeDirectory & "\audio\" & strSplit(X) & ".mp3")
       
mediaPlayer.currentPlaylist.insertItem X, smedia

Thanks again, all!

Viewing all articles
Browse latest Browse all 21090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>