Extracting filenames from a URL by splitting a string
Abstract the implementation into a function. This makes it easy to catch mistakes if you want to use this capability in more than one location. GetUpperBoundElemenentFromDelimitedString takes the required arguments you give it and returns the UBound result. The name may be cumbersome but typing getup and then pressing Ctrl+J will 'List Properties/Methods', the same going to Edit and choosing that option.

Public Function GetUpperBoundElemenentFromDelimitedString(ByVal inputValue As String, ByVal delimiter As String, Optional ByVal compare As VbCompareMethod = VbCompareMethod.vbTextCompare) As String
    Dim temp As Variant
    temp = Split(inputValue, delimiter, compare:=compare)
    GetUpperBoundElemenentFromDelimitedString = temp(UBound(temp))
End Function


Now when you are using it the descriptive name lets you immediately know what's happening.

Public Sub Foo()
    Dim bar As String
    bar = "This,is,going,to,return,an,element,at,a,specific,position."
    Debug.Print GetUpperBoundElemenentFromDelimitedString(bar, ",")
End Sub


The same could be done for a specific position

Public Function GetArrayElemenentFromDelimitedString(ByVal inputValue As String, ByVal delimiter As String, ByVal zeroBasedPosition As Long, Optional ByVal compare As VbCompareMethod = VbCompareMethod.vbTextCompare) As String
    GetArrayElemenentFromDelimitedString = Split(inputValue, delimiter, compare:=compare)(zeroBasedPosition)
End Function