View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul Robinson Paul Robinson is offline
external usenet poster
 
Posts: 208
Default Fill array with Values

Hi
At top of module put
Option Base 1

Inside a sub you can do
lowlet = Array("a", "b",... etc)

then lowlet(2) will be "b" as array counting starts at 1.
regards
Paul
Note you could probably do these examples more efficiently using ascii
codes and looping to fill the arrays.

upperlet() = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y ,Z"
thenum() = "1,2,3,4,5,6,7,8,9,0"
chara() = "!@#%^*"

On Apr 12, 9:40*pm, Brad wrote:
Thanks for taking the time to read my question.

This does not work, and I'm not sure how else to write the code so that each
array will be filled with the values.

Any help would be great,

Thanks,

Brad

code=========================
Dim lowlet() As String
Dim upperlet() As String
Dim thenum() As Integer
Dim chara() As String

lowlet() = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y ,z"
upperlet() = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y ,Z"
thenum() = "1,2,3,4,5,6,7,8,9,0"
chara() = "!@#%^*"