silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi guys,
I am just wondering how I could fill a property let with a function.
for example I got following function
And I like to fill a property Let statement in a class module with this function
this I got in the Class module
Private m_KW as integer
is this possible? Or is that not really how you should do that?
Thanks for your input!
I am just wondering how I could fill a property let with a function.
for example I got following function
Code:
Function KW_DIN(Datum As Date) As Integer
'''geklaut ;o)
''von Christoph Kremer, Aachen
'Berechnt die KW nach DIN 1355
'http://www.office-loesung.de/fpost675805.php#675805
Dim t&
t = DateSerial(Year(Datum + (8 - Weekday(Datum)) Mod 7 - 3), 1, 1)
KW_DIN = (Datum - t - 3 + (Weekday(t) + 1) Mod 7) \ 7 + 1
End Function
And I like to fill a property Let statement in a class module with this function
this I got in the Class module
Private m_KW as integer
Code:
Property Let Kalenderwoche(datKW As Date)
m_KW = KW_DIN(datKW)
End Property
is this possible? Or is that not really how you should do that?
Thanks for your input!