Hi there!
I'm making a subroutine that uses a cell reference as an input (the active cell).
My question is: If I pass a range as "ByRef NAME As Variant", does "NAME" have a worksheet "attached" to it, or is it just a location on the active worksheet?
For instance:
Sub Add(ByRef NAME As Variant, j As Integer, k As Integer)
Dim A As Integer
A = NAME.Row + NAME.Column + (NAME's worksheet index/number)
' how would I add NAME's worksheet number?
End Sub
Thanks!
I'm making a subroutine that uses a cell reference as an input (the active cell).
My question is: If I pass a range as "ByRef NAME As Variant", does "NAME" have a worksheet "attached" to it, or is it just a location on the active worksheet?
For instance:
Sub Add(ByRef NAME As Variant, j As Integer, k As Integer)
Dim A As Integer
A = NAME.Row + NAME.Column + (NAME's worksheet index/number)
' how would I add NAME's worksheet number?
End Sub
Thanks!