Hello,
In my spreadsheet, I defined some name ranges as Page1, Page2, Page3 etc. I want to generate a simple string in VBA that refers to these Name Ranges:
Dim i As Integer
Dim j As String
For i = 1 To 5
j = "Settings For " & [Page & i] & ".xlsm"
Do something
Next i
The Range [Page & i] is obviously not correct. If I write it as [Page1], my string is ok, but I need the name of the page to be define by where we are in the loop. This is just me not being able to use the [] properly. If someone can show me the correct nomenclature, that would be appreciated.
In my spreadsheet, I defined some name ranges as Page1, Page2, Page3 etc. I want to generate a simple string in VBA that refers to these Name Ranges:
Dim i As Integer
Dim j As String
For i = 1 To 5
j = "Settings For " & [Page & i] & ".xlsm"
Do something
Next i
The Range [Page & i] is obviously not correct. If I write it as [Page1], my string is ok, but I need the name of the page to be define by where we are in the loop. This is just me not being able to use the [] properly. If someone can show me the correct nomenclature, that would be appreciated.