clazy
10-15-2008, 08:08 PM
How can I check the array size when user expects by Ctrl + Shift + Enter? e.g.
Function test()
Dim r As Long
Dim c As Long
Dim count As Long
'Here, assign (r,c) as user input dimension
'r = 5
'c = 3
count = 1
ReDim v(1 To r, 1 To c)
For i = 1 To r
For j = 1 To c
v(i, j) = count
count = count + 1
Next j
Next i
test = v
End Function
Thanks!
Function test()
Dim r As Long
Dim c As Long
Dim count As Long
'Here, assign (r,c) as user input dimension
'r = 5
'c = 3
count = 1
ReDim v(1 To r, 1 To c)
For i = 1 To r
For j = 1 To c
v(i, j) = count
count = count + 1
Next j
Next i
test = v
End Function
Thanks!