Thread: variable
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default variable

Create an array of variables

Dim xmean(1 to 20)

... load the array

For i = 1 To 20
Debug.Pring xmean(i)
Next i

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
ups.com...
Hi, Ive got 20 variables named xmean1, xmean2,
xmean3............xmean20. I want to refer to these with, For I = 1 TO
20. Ive tried, xmean(i), xmean & i and (xmean(i)). Any idea on how to
do this, or is this not possible.
Regards Robert