Please show an example with two or three entries from List1 and then show what List2 should look like.
Tips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Private Message Viewer • Copy/Paste VB Code • Paste VB Code Add-In • Insert Procedure Names Add-In • A calculator for the game of Spider • My review of REALbasic 2008 • VB6 Debug Tutorial • Picture/Video Viewer • VBF Photo Contest Winners 2009 - 2016
result examples: List1 http://mp3.nemexis.com/data1 http://mp3.nemexis.com/data2 http://mp3.nemexis.com/data3 List2 data1 data2 data3
Code: Dim intPos As Integer Dim intIndex As Integer For intIndex = 0 To List1.ListCount - 1 intPos = InStrRev(List1.List(intIndex), "/") If intPos > 0 Then List2.AddItem Right$(List1.List(intIndex), Len(List1.List(intIndex)) - intPos) End If Next
Dim intPos As Integer Dim intIndex As Integer For intIndex = 0 To List1.ListCount - 1 intPos = InStrRev(List1.List(intIndex), "/") If intPos > 0 Then List2.AddItem Right$(List1.List(intIndex), Len(List1.List(intIndex)) - intPos) End If Next
Forum Rules