Q:

Using links from a list in vba

I would like to use links from a container: one by one. I don't know the proper way of doing it. The way I tried to do below is kinda weird but it will give you an idea what I wanna achieve.
Sub Iterating_links()
    Dim str As String, vault As String

    vault = "https://www.yify-torrent.org/search/1080p/, https://yts.ag/browse-movies"

    For Each str In vault
        MsgBox str
    Next str
End Sub

There are two links in the container vault and I would like to see the result in msgbox one by one. Thanks.

A:

Assuming your links are seperated by , try
Sub Iterating_links()
    Dim str As String, vault As String
    Dim arr() As String, items

    vault = "https://www.yify-torrent.org/search/1080p/, https://yts.ag/browse-movies"
    arr() = Split(vault, ",")

    For Each items In arr
        MsgBox items
    Next items
End Sub

