Hi Henning,
But the "Call lib.Bar(myPeriode)" won't compile :(
Because there is a typo in this sub:
Public Function Foo
Dim myPeriode As Periode
Call lib.Bar(myPeriode)
End Function
Change Periode to Period.
Have you got "require variable declaration" checked in tools, options
editor of the VBE? If not, I recommend doing so. It will add "Option
Explicit" to the top of any new module (you'll have to add it yourself
to existing ones) and would have given a compile error on the Dim
statement.
Regards,
Jan Karel Pieterse
Excel MVP
www.jkp-ads.com