C
Carl
I have been struggling with this problem and would
appreciate some help. I suspect that there is a simple
solution, but after reading a VBA book, searching the
internet and trying various apporaches, I am stuck.
Simply put, I'd like to be able to do something like:
For i = 0 To maxLists
objTemp = "listJobTitles" & i
With objTemp
...
End With
Next i
Instead, I am forced to explicitly define each occurence
of objects as follows...
For i = 0 To maxLists
Select Case i
Case 0
objTemp = listJobTitles0
Case 1
objTemp = listJobTitles1
Case 2
objTemp = listJobTitles3
...
...
...
End Select
With objTemp
....
End With
Next i
Essentially I need a way to build the name of an object
using some form of expression rather than using explicit
definitions. In scripting languages such as JScript and
PHP you can use eval(expression) ... but as a newbie, I
am at a loss on how best to handle this in VBA.
TIA
appreciate some help. I suspect that there is a simple
solution, but after reading a VBA book, searching the
internet and trying various apporaches, I am stuck.
Simply put, I'd like to be able to do something like:
For i = 0 To maxLists
objTemp = "listJobTitles" & i
With objTemp
...
End With
Next i
Instead, I am forced to explicitly define each occurence
of objects as follows...
For i = 0 To maxLists
Select Case i
Case 0
objTemp = listJobTitles0
Case 1
objTemp = listJobTitles1
Case 2
objTemp = listJobTitles3
...
...
...
End Select
With objTemp
....
End With
Next i
Essentially I need a way to build the name of an object
using some form of expression rather than using explicit
definitions. In scripting languages such as JScript and
PHP you can use eval(expression) ... but as a newbie, I
am at a loss on how best to handle this in VBA.
TIA