I
ina
hello all,
I have one sub and one function; ma function need to calculate the
range from the activecell + size array.
this is the code;
Sub display_array()
Dim s(3, 3) As String
Dim arraysize As Integer
Dim rng As range
s(1, 1) = "A"
s(2, 1) = "B"
s(3, 1) = "C"
arraysize = 3
rng = selectRange(arraysize)
rng = s
End Sub
Function selectRange(size As Integer) As range
Dim arraysize, j, h As Integer
Dim newcolumn As String
Dim rng As range
arraysize = size
Dim addr As String
addr = ActiveCell.Address
j = ColRef2ColNo(addr)
h = j + arraysize
newcolumn = ColNo2ColRef(h)
range(ActiveCell, newcolumn + CStr(10)).Select
selectRange = rgn
End Function
I have a problem because my function is empty and I do not understand
why. Can someone help me on that?
Ina
I have one sub and one function; ma function need to calculate the
range from the activecell + size array.
this is the code;
Sub display_array()
Dim s(3, 3) As String
Dim arraysize As Integer
Dim rng As range
s(1, 1) = "A"
s(2, 1) = "B"
s(3, 1) = "C"
arraysize = 3
rng = selectRange(arraysize)
rng = s
End Sub
Function selectRange(size As Integer) As range
Dim arraysize, j, h As Integer
Dim newcolumn As String
Dim rng As range
arraysize = size
Dim addr As String
addr = ActiveCell.Address
j = ColRef2ColNo(addr)
h = j + arraysize
newcolumn = ColNo2ColRef(h)
range(ActiveCell, newcolumn + CStr(10)).Select
selectRange = rgn
End Function
I have a problem because my function is empty and I do not understand
why. Can someone help me on that?
Ina