VBA: Unterschied zwischen den Versionen
Aus Claudio's Wiki
(→VBA-Klassen) |
|||
Zeile 24: | Zeile 24: | ||
Private Sub Class_Initialize() | Private Sub Class_Initialize() | ||
Set pCollection = New Collection | Set pCollection = New Collection | ||
− | |||
End Sub | End Sub | ||
Private Sub Class_Terminate() | Private Sub Class_Terminate() | ||
Set pCollection = Nothing | Set pCollection = Nothing | ||
− | |||
End Sub | End Sub | ||
Aktuelle Version vom 14. Dezember 2008, 18:14 Uhr
Hier finden sich Tipps und Tricks sowie Code-Vorlagen zu VBA (Visual-Basic for Applications)
Programmierung mit Outlook
Eine Einleitung:
VBA-Klassen
Quelle: Online-Excel
Option Explicit Dim pCollection As Collection Private pProjNr As Long Private pKundeProjekt As String Private Sub Class_Initialize() Set pCollection = New Collection End Sub Private Sub Class_Terminate() Set pCollection = Nothing End Sub Public Property Get coll() As Collection Dim tempColl As Collection Set tempColl = pCollection Set coll = tempColl End Property Public Property Get projNr() As Variant projNr = pProjNr End Property Public Property Let projNr(ByVal vNewValue As Variant) pProjNr = vNewValue End Property Public Property Get kundeProjekt() As Variant kundeProjekt = pKundeProjekt End Property Public Property Let kundeProjekt(ByVal vNewValue As Variant) pKundeProjekt = vNewValue End Property