Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
search an array for values contained in another array | Excel Programming | |||
fill cells values with range values | Excel Programming | |||
fill array with only values | Excel Programming | |||
Fill values into a listbox matching selected values from a combobox | Excel Programming | |||
Fill an Array with String values | Excel Programming |