I'm calling a function to add dates to a complicated URL String to make it variable. The debug in the function PutTogetherURL() prints the correct URL however the debug for URL(4) does not. I know i'm missing something stupid easy I just can't figure out what. Any advice appreciated.
Sub PullStuff()
Dim response As String
Dim URL(1 To 13) As Variant, BoB
Dim PullDate As Date
PullDate = Sheets("EOD").Range("M5")
BoB = 11
URL(1) = "google.com"
URL(2) = "Yahoo.com"
URL(3) = "Amazon.com"
URL(4) = PutTogetherURL(Format(PullDate, "yyyy-mm-dd"))
End Sub
Function PutTogetherURL(StartDate As String) As String
Dim URL As String
URL = "Yahoo" & StartDate & ".com"
Debug.Print URL
Exit Function
End Function