Hello everyone.
Technically this is on Excel VBA since I open Excel from Access and work with it, but I don't think it matters since the problem here is clearly the passing into my function by ref.
I don't get my issue at all, and I'm even pretty sure it worked just fine until yesterday and I literally didn't touch anything.
Here's my function:
Here's how I call the function:
The problem is that once in the function, my "slctn" object is "nothing".
I tried all of the following and more:
The selection never passes into the function. What is going on here?
Thanks.
Technically this is on Excel VBA since I open Excel from Access and work with it, but I don't think it matters since the problem here is clearly the passing into my function by ref.
I don't get my issue at all, and I'm even pretty sure it worked just fine until yesterday and I literally didn't touch anything.
Here's my function:
Code:
Public Function MaJBFE(ByRef slctn As Range)
Here's how I call the function:
Code:
ElseIf Selection.Rows.Count > 1 Then
MaJBFE Selection
The problem is that once in the function, my "slctn" object is "nothing".
I tried all of the following and more:
Code:
Dim rng as Range
Set rng = Selection
MaJBFE rng
Code:
Call MaJBFE(Selection)
Code:
MaJBFE (Selection)
The selection never passes into the function. What is going on here?
Thanks.