Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Fill array with Values

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() = "!@#%^*"
  #2   Report Post  
Posted to microsoft.public.excel.programming
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() = "!@#%^*"


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Fill array with Values

Sorry, forgot to mention you will have to declare
Dim lowlet as Variant

regards
Paul

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() = "!@#%^*"


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Fill array with Values

Try these...

lowlet() = Split("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() = Split("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() = Split("1,2,3,4,5,6,7,8,9,0", ",")
chara() = Split("!,@,#,%,^,*", ",")

I'm curious as to why you are setting up these particular arrays and how you
plan to use them... depending on what it is you are going to do with these
arrays, it is possible that there might be other (more efficient) ways to do
it without using these arrays.

--
Rick (MVP - Excel)



"Brad" wrote in message
...
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() = "!@#%^*"


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Fill array with Values

Thanks to both of you for your great replies. They were very helpful

Have a great day,

Brad

"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() = "!@#%^*"

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
search an array for values contained in another array Cheer-Phil-ly Excel Programming 0 April 12th 07 09:44 PM
fill cells values with range values sloth Excel Programming 0 September 26th 06 02:00 AM
fill array with only values GKeramidas Excel Programming 3 September 4th 06 09:57 AM
Fill values into a listbox matching selected values from a combobox Jon[_19_] Excel Programming 4 January 25th 05 04:25 PM
Fill an Array with String values John Michl[_2_] Excel Programming 6 May 14th 04 07:10 PM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"