Thread: Types in Add-In
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jan Karel Pieterse Jan Karel Pieterse is offline
external usenet poster
 
Posts: 535
Default Types in Add-In

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