G
Guest
I have clearly failed to understand the syntax of enumerated types. Having
declared :-
Enum ACGroup
A = 1
B
C
D
End Enum
I cannot then access the members of the group. With J as a variable byte,
the compiler baulks at ACGroup.J or ACGroup(J). I simply wish to return A…D
for values of J between 1 and 4, respectively.
There are other ways of doing this, of course, and, in this trivial example,
probably better ways, but it would be nice to have this option available.
One alternative I could try, in the mean time, is to declare a string array
and access its members using J as an index. As an old (=elderly) ‘C’
programmer, I also tried ‘For stString = “A†To “D†…, but, hardly
surprisingly, VBA was having none of it. Would anyone be kind enough to
clarify the situation for me?
declared :-
Enum ACGroup
A = 1
B
C
D
End Enum
I cannot then access the members of the group. With J as a variable byte,
the compiler baulks at ACGroup.J or ACGroup(J). I simply wish to return A…D
for values of J between 1 and 4, respectively.
There are other ways of doing this, of course, and, in this trivial example,
probably better ways, but it would be nice to have this option available.
One alternative I could try, in the mean time, is to declare a string array
and access its members using J as an index. As an old (=elderly) ‘C’
programmer, I also tried ‘For stString = “A†To “D†…, but, hardly
surprisingly, VBA was having none of it. Would anyone be kind enough to
clarify the situation for me?