Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am testing a macro and I cant figure out what I'm doing wrong. I have
named a range, dvec, that contains contiguous data. I want to pass the number of data points, n, to the array cvec(n). To test this I inserted the MsgBox line. When I run this macro, I get the number of rows in the range dvec rather than the count of data points. What am I doing wrong? I have made sure all blank cells in the range are clear. Option Base 1 Sub SelectCount() 'Re-Dim data array cvec Dim n, cvec Sheets("Sheet2").Range("dvec").Select n = Selection.Count ReDim cvec(n) MsgBox "The size of vector cvec is " & n End Sub TIA Steve H |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nested IF isnt working right..Why? | Excel Worksheet Functions | |||
Conditional Formatting isnt working right | Excel Discussion (Misc queries) | |||
autofilter isnt working | Excel Discussion (Misc queries) | |||
Function isnt working, just displays the formula in cell?eg A2+B2 | Excel Discussion (Misc queries) | |||
AutoFill isnt working? | Excel Discussion (Misc queries) |