Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to use a cell value as the base for the name of a variable
I have a list of names stored in a worksheet and I want to use these to
define a set of variables. I there anyway to do this I tried this Dim Sheets("names").Cells(1,1).Value As String but with no luck Ian B |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to use a cell value as the base for the name of a variable
Hi Ian,
Perhaps you could do something like: Sub Test() Dim arrNames As Variant arrNames = Range("A1:A20") For i = LBound(arrNames) To UBound(arrNames) Debug.Print arrNames(i) Next i End Sub --- Regards, Norman "Ian B" wrote in message ... I have a list of names stored in a worksheet and I want to use these to define a set of variables. I there anyway to do this I tried this Dim Sheets("names").Cells(1,1).Value As String but with no luck Ian B |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
emptying the contets of a cell base on the value of another cell | Excel Worksheet Functions | |||
Define a cell value base on the date | Excel Discussion (Misc queries) | |||
how to show different photos, base on different value of a cell? | Excel Worksheet Functions | |||
unique values in a cell base on another cell | Excel Discussion (Misc queries) | |||
Playing a sound base on cell value | Excel Programming |