SAYFALARA KAYIT

Katılım
21 Mart 2005
Mesajlar
200
Excel Vers. ve Dili
Ofiice 2013
Private Sub CommandButton3_Click()
If TextBox2 = "" Or TextBox3 = "" Then
MsgBox "TARİH GİRİÃžİ YAPILMADI"
Exit Sub
End If
satd = WorksheetFunction.CountA(Sheets(Combobox1.Value).[d10:d40]) + 10
sate = WorksheetFunction.CountA(Sheets(Combobox1.Value).[e10:e40]) + 10
Sheets(Combobox1.Value).Cells(satd, 4) = CDate(TextBox2.Value)
Sheets(Combobox1.Value).Cells(sate, 5) = CDate(TextBox3.Value)
Label25 = "kayıt yapılan sayfa: " & ComboBox1.Value
TextBox2 = ""
TextBox3 = ""

burada Combobox1 de seçtim isme göre sayfa 1,2,3 'e kaydetme nasıl yapılır.(ALİ sayfa1, MEHMET Sayfa2 , VELİ Sayfa3)


Office 2003 Türkçe
 

veyselemre

Özel Üye
Katılım
9 Mart 2005
Mesajlar
3,646
Excel Vers. ve Dili
Pro Plus 2021
Private Sub ComboBox1_Change()
Label25 = "kayıt yapılan sayfa: " & ComboBox1.Value
End Sub

Private Sub CommandButton3_Click()
If TextBox2 = "" Or TextBox3 = "" Then
MsgBox "TARİH GİRİÃžİ YAPILMADI"
Exit Sub
End If


Select Case ComboBox1.ListIndex
Case Is = 0: sayfa = "sayfa1"
Case Is = 1: sayfa = "sayfa2"
Case Is = 2: sayfa = "sayfa3"
End Select

satd = WorksheetFunction.CountA(Range(sayfa & "!d10:d40")) + 10

Range(sayfa & "!d" & satd) = CDate(TextBox2.Value)
Range(sayfa & "!e" & satd) = CDate(TextBox3.Value)

'TextBox2 = ""
'TextBox3 = ""

End Sub
Private Sub UserForm_Activate()
ComboBox1.AddItem "ALİ"
ComboBox1.AddItem "MEHMET"
ComboBox1.AddItem "VELİ"
ComboBox1.ListIndex = 2
Label25 = "kayıt yapılan sayfa: " & ComboBox1.Value
End Sub
 
Üst