Excel 16.13 for Mac User Defined Class passed as parameter all properties are Null

Build 424: Properties all return Null but Methods work.


Option Explicit

Sub testUDC()
Dim oTest As clsTest
Set oTest = New clsTest
oTest.Name = "Fred"
oTest.Var = 1
Debug.Print oTest.Name, oTest.Var, oTest.Value()    ' Fred       1    1
oTest.Value = 2
Debug.Print oTest.Name, oTest.Var, oTest.Value()    ' Fred       2    2
printTest oTest
End Sub

Sub printTest(obj As Object)
Debug.Print IsObject(obj), TypeName(obj), (obj Is Nothing) ' True  clsTest    False
Debug.Print obj.Name, obj.Var, obj.Value()
'Excel 2016 Win (16.0 build 9126) : Fred      2     2
'Excel 2016 Mac (16.13 build 424) : Null      Null  2
End Sub


Option Explicit

Public Name As String
Public Var As Variant
Public obj As Object

Public Property Get Value()
Value = Var
End Property

Public Property Let Value(varValue As Variant)
Var = varValue
End Property


Hi P O'Beirne,

Thank you very much for the bug report and files to help reproduce the problem. I'm sorry for the delay in investigating and responding... I have checked in a fix that will ship in the 16.16 release of Mac Office 2016 in mid-August. 

Schwieb [MSFT]

1 person was helped by this reply


Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.


Question Info

Last updated January 9, 2020 Views 391 Applies to: