I'm attempting to assign strings based on column entries of which the amount changes (may be 15-40 entries depending on the day), then open URLs by adding the strings to a fixed beginning of the URL. My issue is the assignment of the variables. My code is as follows:
'LOOP 1:
'Table Entries
Dim RowCount As Integer
Sheets("Table").Select
Sheets("Table").Range("A2").Select
Do While True
ActiveCell.Offset(1, 0).Select
If IsEmpty(ActiveCell.Value) Then
RowCount = ActiveCell.Row
Exit Do
End If
Loop
RowCount = RowCount - 2
'LOOP 2:
'Assign IDs and URLs
Dim ID(1 To RowCount) As Variant
Dim URL(1 To RowCount) As String
Dim i1 As Integer
For i1 = 1 To RowCount
ID(i1) = Sheets("Table").Range("A" + CStr(i + 1)).Value
URL(i1) = "--Redacted--" + CStr(URL(i1))
Next i1
The issue is declaring the ID and URL variables as a function of RowCount. I'm sure there is another way to declare these, but my lack of experience is showing.
Thanks in advance.