Private Sub Workbook_Open()
Dim strEingabe As String
strEingabe = InputBox("eingabe:", "Frage:", 123)
If strEingabe = "" Then Exit Sub
End Sub
aber ich weiß nicht wie ich den Wert dann in eine gewünschte Zelle schreiben kann?
Private Sub Workbook_Open()
Dim strEingabe As String
strEingabe = InputBox("eingabe:", "Frage:", 123)
If strEingabe = "" Then Exit Sub
End Sub
Private Sub Workbook_Open()
Dim strEingabe As String, lz As Long
strEingabe = InputBox("eingabe:", "Frage:", 123)
If strEingabe = "" Then Exit Sub
With Sheets("Tabelle1")
lz = .Cells(Rows.Count, 1).End(xlUp).Row + 1
.Cells(lz, 1) = strEingabe
End With
End Sub
Private Sub Workbook_Open()
Dim strEingabe As String, lz As Long
strEingabe = InputBox("Wie ist dein heutiger Kontostand:", "Kontostand:", 0)
If strEingabe = "" Then Exit Sub
With Sheets("Tabelle1").Range("B12")
lz = .Cells(Rows.Count, 1).End(xlUp).Row + 1
.Cells(lz, 1) = strEingabe
End With
End Sub
Private Sub Workbook_Open()
Dim strEingabe As String, lz As Long
strEingabe = InputBox("Wie ist dein heutiger Kontostand:", "Kontostand:", 0)
If strEingabe = "" Then Exit Sub
With Sheets("Tabelle1")
lz = .Cells(Rows.Count, 1).End(xlUp).Row + 1
If lz < 12 Then lz = 12
.Cells(lz, 1) = strEingabe
End With
End Sub
Private Sub Workbook_Open()
Dim strEingabe As String, lz As Long
Dim z As Range
strEingabe = InputBox("Wie ist dein heutiger Kontostand:", "Kontostand:", 0)
If strEingabe = "" Then Exit Sub
With Sheets("Tabelle1")
'Datum suchen und z darauf verweisen lassen
Set z = .Range("A:A").Find(Date)
If z Is Nothing Then
'nicht gefunden, dann Meldung und Ende
MsgBox "Der " & Date & " wurde nicht gefunden!"
Else
'gefunden, dann in Spalte B des heutigen Datums den Wert eintragen
.Cells(z.Row, 2) = strEingabe
End If
End With
End Sub
Private Sub Workbook_Open()
Dim strEingabe As String, lz As Long
Dim z As Range
With Sheets("Tabelle1")
'Datum suchen
Set z = .Range("A:A").Find(Date)
If z Is Nothing Then
'nicht gefunden, dann Meldung und Ende
MsgBox "Der " & Date & " wurde nicht gefunden!"
Else
If .Cells(z.Row, 2) = "" Then
strEingabe = InputBox("Wie ist dein heutiger Kontostand:", "Kontostand:", 0)
.Cells(z.Row, 2) = CDbl(strEingabe)
End If
End If
End With
End Sub