View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Connie Connie is offline
external usenet poster
 
Posts: 106
Default Use Value of Dynamically Created Variable

I know this is easy, but I can't figure out the syntax to use the actual value of a variable created dynamically in a For loop. See below. Any help would be appreciated. Thanks!

Dim CHT_1, CHT_2, CHT_3, CHT_4 as Integer
Dim VariableName as String

CHT_1 = 5
CHT_2 = 6
CHT_3 = 7
CHT_4 = 8

For i = 1 to 4
VariableName = "CHT_" + CStr(i)
Can't figure out syntax to use actual value of variable name
Next i