DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim sh As Worksheet, sat As Long, txtbx As Object
If MultiPage1.Value = 0 Then
Set sh = Sheets("Gelirler")
Set txtbx = TextBox1
ElseIf MultiPage1.Value = 1 Then
Set sh = Sheets("Giderler")
Set txtbx = TextBox2
End If
sat = sh.Range("A" & Rows.Count).End(xlUp).Row + 1
sh.Cells(sat, "A").Value = WorksheetFunction.Max(sh.Range("A:A")) + 1
sh.Cells(sat, "B").Value = txtbx
Set sh = Nothing: Set txtbx = Nothing
End Sub
Dosyanız ektedir.
Kod:Private Sub CommandButton1_Click() Dim sh As Worksheet, sat As Long, txtbx As Object If MultiPage1.Value = 0 Then Set sh = Sheets("Gelirler") Set txtbx = TextBox1 ElseIf MultiPage1.Value = 1 Then Set sh = Sheets("Giderler") Set txtbx = TextBox2 End If sat = sh.Range("A" & Rows.Count).End(xlUp).Row + 1 sh.Cells(sat, "A").Value = WorksheetFunction.Max(sh.Range("A:A")) + 1 sh.Cells(sat, "B").Value = txtbx Set sh = Nothing: Set txtbx = Nothing End Sub