Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Looking at the code below, what do some of these mea? Like ReDim and ReDim
Preserve? And v(i). Is this a variable, and if so, why the i in parens? ReDim v(0 To 0) ReDim Preserve v(0 To i) v(i) = "State" & Right(ctrl.Name, 1) ActiveSheet.Shapes.Range(v).Select |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mike,
see help for using arrays, should give you appropriate answers. Regards, Ivan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why not highlight the code in the VBE and hit F1.
-- Regards, Tom Ogilvy "Mike" wrote: Looking at the code below, what do some of these mea? Like ReDim and ReDim Preserve? And v(i). Is this a variable, and if so, why the i in parens? ReDim v(0 To 0) ReDim Preserve v(0 To i) v(i) = "State" & Right(ctrl.Name, 1) ActiveSheet.Shapes.Range(v).Select |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have tried this and was looking for a simpler explanation. Plus, it doesn't
say anything about Preserve that I saw, or why you have (0 To 0) for ReDim. Thanks anyways. "Mike" wrote: Looking at the code below, what do some of these mea? Like ReDim and ReDim Preserve? And v(i). Is this a variable, and if so, why the i in parens? ReDim v(0 To 0) ReDim Preserve v(0 To i) v(i) = "State" & Right(ctrl.Name, 1) ActiveSheet.Shapes.Range(v).Select |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you highlighted redim and hit F1, it has all kinds of information on
Preserve. Dim v() as Variant declares v as a dynamic array of type variant. Redim v(0 to 0) initializes v to by a one dimensonal array with a lower bound of zero and an upperbound of zero (therefore it is one element) redim Preserve v(0 to i) redimensions the array v (while preserving it existing content) to have a lower bound of zero and an upper bound of the value in the variable i so it has i - 0 + 1 elements or i + 1 elements. -- Regards, Tom Ogilvy "Mike" wrote: I have tried this and was looking for a simpler explanation. Plus, it doesn't say anything about Preserve that I saw, or why you have (0 To 0) for ReDim. Thanks anyways. "Mike" wrote: Looking at the code below, what do some of these mea? Like ReDim and ReDim Preserve? And v(i). Is this a variable, and if so, why the i in parens? ReDim v(0 To 0) ReDim Preserve v(0 To i) v(i) = "State" & Right(ctrl.Name, 1) ActiveSheet.Shapes.Range(v).Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
A few things | Excel Worksheet Functions | |||
######THEY DO DIFFERENT THINGS TO GET IT############# | Charts and Charting in Excel | |||
two things at once? | Excel Programming | |||
2 things | Excel Programming | |||
2 things | Excel Programming |