I had found a lot similar topics but no solution only workarounds (many advices to use classes but I do not understand how to do it - I want it to be as simple and short as possible)
Private Type Bottom_Rit
Bot As Integer
Rit As Integer
End Type
Dim BxR_1 As Bottom_Rit
Sub Fpage()
BxR_1 = Lab(a, b)
End Sub
Private Sub Button1_Click()
Fpage
End Sub
Function Lab(a As Integer, b As Integer) As Bottom_Rit
Lab.Bot = a
Lab.Rit = b
End Function
Trying to repeat the code from this thread link to stackoverflow thread
I get an error message "Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions"