Thema Datum  Von Nutzer Rating
Antwort
20.03.2015 15:01:47 kkarl
NotSolved
20.03.2015 15:34:05 Gast30172
NotSolved
20.03.2015 15:51:05 kkarl
NotSolved
20.03.2015 15:52:24 kkarl
NotSolved
20.03.2015 16:02:12 Gast36405
NotSolved
Blau im Nachhinein, noch ein Gedanke/Vorschlag dazu
20.03.2015 16:15:41 Gast58608
NotSolved

Ansicht des Beitrags:
Von:
Gast58608
Datum:
20.03.2015 16:15:41
Views:
949
Rating: Antwort:
  Ja
Thema:
im Nachhinein, noch ein Gedanke/Vorschlag dazu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'class: MyClass
Option Explicit
 
Private m_Name  As MyProperty
Private m_Price As MyProperty
 
Private Sub Class_Initialize()
  Set m_Name = New MyProperty
  Set m_Price = New MyProperty
End Sub
 
Property Get Name() As MyProperty
  Set Name = m_Name
End Property
 
Property Get Price() As MyProperty
  Set Price = m_Price
End Property
 
Public Sub print_(Prop As MyProperty)
   
  If Prop Is m_Name Then
    MsgBox "Name"
  ElseIf Prop Is m_Price Then
    MsgBox "Preis"
  Else
    '...
  End If
   
End Sub
1
2
3
4
'class: MyProperty
Option Explicit
 
Public Value As Variant
1
2
3
4
5
6
7
8
9
10
Sub t()
   
  Dim a As New MyClass
   
  a.Name.Value = "Name"
  a.Price.Value = 12.3
   
  a.print_ a.Price
   
End Sub

 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
20.03.2015 15:01:47 kkarl
NotSolved
20.03.2015 15:34:05 Gast30172
NotSolved
20.03.2015 15:51:05 kkarl
NotSolved
20.03.2015 15:52:24 kkarl
NotSolved
20.03.2015 16:02:12 Gast36405
NotSolved
Blau im Nachhinein, noch ein Gedanke/Vorschlag dazu
20.03.2015 16:15:41 Gast58608
NotSolved