Option
Explicit
Private
Sub
Eintragen_Click()
Dim
Datumzelle
As
Range
Dim
spalte
As
Variant
, zeile
As
Variant
For
Each
Datumzelle
In
[A:A]
If
IsEmpty(Datumzelle) =
True
Then
Exit
For
Next
Datumzelle = ActiveCell
neuesDatum =
Date
$
Datumzelle.Value =
CDate
(neuesDatum)
spalte = Datumzelle.Column
zeile = Datumzelle.Row
Cells(zeile, spalte + 1) =
CSng
(Gold)
Cells(zeile, spalte + 2) =
CSng
(Rohöl)
Cells(zeile, spalte + 3) =
CSng
(Silber)
Cells(zeile, spalte + 4) =
CSng
(Erdgas)
Cells(zeile, spalte + 5) =
CSng
(Baumwolle)
Cells(zeile, spalte + 6) =
CSng
(Zucker)
Cells(zeile, spalte + 7) =
CSng
(Weizen)
Cells(zeile, spalte + 8) =
CSng
(Kupfer)
Cells(zeile, spalte + 9) =
CSng
(Platin)
Dim
auswahl
As
Byte
, auswahl2
As
Byte
With
UserForm1
If
.OptionButton1.Value =
True
Then
auswahl 1
If
.OptionButton2.Value =
True
Then
auswahl 2
If
.OptionButton3.Value =
True
Then
auswahl 3
End
If
End
With
With
UserForm1
If
.OptionButton4.Value =
True
Then
auswahl2 = 1
ElseIf
.OptionButton5.Value =
True
Then
auswahl2 = 2
End
If
End
With
Call
DialogMarktAuswerten(auswahl, auswahl2)
End
Sub
Private
Sub
Schließen_Click()
UserForm1.Hide
End
Sub
Private
Sub
Löschen_Click()
neuesDatum =
""
Gold =
""
Rohöl =
""
Silber =
""
Erdgas =
""
Baumwolle =
""
Zucker =
""
Weizen =
""
Kupfer =
""
Platin =
""
End
Sub