tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,926
- Office Version
- 365
- 2019
- Platform
- Windows
I seem to be confused with regard to ByRef and ByVal.
Here, regardless of ByRef or ByVal, the result in the immediate window is 100. I though ByVal DOESN'T change things.
Here, regardless of ByRef or ByVal, the result in the immediate window is 100. I though ByVal DOESN'T change things.
Code:
Option Explicit
Dim pabc As Long
Sub Test()
abc = 10
Debug.Print pabc
End Sub
Property Let abc(ByVal a)
a = 100
pabc = a
End Property
Last edited: