I am having trouble assigning to a range. Assume that I am passing a column range into the function. How can I modify the following to get it to assign a value to my_range?
Function assign_me(ByRef my_range As Range) As Double
Dim my_array As Variant
my_array = myrange.Value
For I = 1 To UBound(my_array, 1)
my_range(I, 1).Value = I
Next I
assign_me = 0#
End Function
Function assign_me(ByRef my_range As Range) As Double
Dim my_array As Variant
my_array = myrange.Value
For I = 1 To UBound(my_array, 1)
my_range(I, 1).Value = I
Next I
assign_me = 0#
End Function