Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim ProjPC() As Single
ReDim ProjPC(1) ProjNo = 1 ProjPC(ProjNo) = 15 ReDim Preserve ProjPC(2) ProjNo = 2 ProjPC(ProjNo) = 30 etc. Or Dim ProjPC() As Single Redim ProjPC(1 to 10) ProjNo = 1 ProjPC(ProjNo) = 15 ProjNo = 2 ProjPC(ProjNo) = 30 Redim Preserve ProjPC(1 to 2) Alan Beban Chaplain Doug wrote: Excel 2003 Profession. In my code I have the following: Dim ProjPC() as Single Later in the code I try to assign: ProjNo=1 ProjPC(ProjNo)=15 I get the error: Subscript out of range WHAT am I doing wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I have a cell value define a dynamic named range? | Excel Worksheet Functions | |||
Define Dynamic Name | Excel Discussion (Misc queries) | |||
dynamic search in the Define Name window | Excel Discussion (Misc queries) | |||
Define a variable for dynamic chart | Excel Programming | |||
Define a Dynamic Range Based on an Index | Excel Programming |