Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following subroutine. Why can't I see the passed-in Range's
Cells(x,y).Value? Sub getDataInfo2(sRange As Range) Const maxr = 15 Const defSize = 100 Dim row As Integer Dim col As Integer Dim i As Integer Dim size As Integer Dim buffer(defSize) ' Get data from source range row = sRange.row col = sRange.Column size = 0 For i = 0 To maxr If sRange.Cells(row, col).Value < "" Then ' This if() NEVER passes - ??????????????????????? buffer(size) = sRange.Cells(row, col).Value size = size + 1 End If col = col + 1 Next i End Sub Sub test() Dim baseBook As Workbook Dim currSheet As Worksheet Dim sRange as Range set baseBook = ThisWorkbook set currSheet = baseBook.Sheets(2) currSheet.Activate set sRange = currSheet.Range("A1:J1") ' I CAN SEE CELL VALUES IN THE RANGE HERE Call getDataInfo2(sRange) End Sub Any clues? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PERCENTILE with an IF Clause | Excel Worksheet Functions | |||
IF Clause | Excel Worksheet Functions | |||
Can I use a between clause or in clause on an IF statement | Excel Programming | |||
IF Clause | Excel Programming | |||
"Between" in an IF clause | Excel Discussion (Misc queries) |