0
Ich arbeite in einer Arbeitsmappe mit zwei Blätter namens "Data" und "Daily". Ich möchte nur, dass mein Code neue Eingaben im Tagesblatt speichert, aber anstatt dies zu tun, speichert er das aktive Blatt. Ich bin dankbar, wenn jemand dieses Problem lösen kann.Wie kann ich vermeiden, dass meine Daten nicht auf dem aktiven Blatt gespeichert werden?
Hier ist mein Code:
Private Sub CommandButton1_Click() 'Saving Button
Dim sonsat As Long
sonsat = Sheets("Daily").Cells(Rows.Count, 1).End(xlUp).Row + 1
Call Main 'Progress Bar
Cells(sonsat, 1) = TextBox1
Cells(sonsat, 2) = TextBox2
Cells(sonsat, 3) = TextBox3
Cells(sonsat, 4) = TextBox4
Cells(sonsat, 5) = TextBox5
MsgBox "Registration is successful"
ListBox1.List = Sheets("Daily").Range("A2:E" & Cells(Rows.Count, 1).End(xlUp).Row).Value 'For refresh listbox
TextBox14.Value = ListBox1.ListCount
End Sub
danke Liebe :) – Yasir