• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Combobox değerine göre sayfaya kayıt

Katılım
21 Ağustos 2005
Mesajlar
10
Merhaba. UserForm1 de combobox1'de sabit verilerim var KG, BR, BRPO (Not sayfa isimlerimde bu verilerle aynı KG, BR, BRPO). Benim istediğim Combobox1 de KG seçili ise bütün verileri ilgili sayfaya kayıt yapmak. Bununla beraber UserForm2'de soruglama ve düzenlemede yine Combobox değerine göre verileri çağırmak istiyorum. Bu konuda bana yardımcı olursanız sevinirim. Şimdiden teşekkürler.
 

Ekli dosyalar

2003 formatında yollayın herkeste 2007 yok.Bendede yok.:cool:
 
UserForm nesnesinde uyumsuz renkler seçmişsiniz. Lacivert fona siyah yazılar gözümü aldı ve hiç bir şey okuyamadım. Renkleri değiştirmenizi tavsiye ederim.
 
Dosyanız ektedir.:cool:
Kod:
Private Sub CommandButton1_Click()
Dim sh As Worksheet, sat As Long, nesne As Control
If ComboBox3.Value = "" Then
    MsgBox "Lütfen Kaynakçı belgelerinden bir seçim yapınız."
    ComboBox3.SetFocus
    Exit Sub
End If
Set sh = Sheets(ComboBox3.Value)
sat = sh.Cells(65536, "A").End(xlUp).Row + 1
If sat > 1000000 Then
    MsgBox "[ " & ComboBox3.Value & "] sayfasında satır doldu!" & vbLf & _
    "Kayıt yapılmadı.", vbCritical, "UYARI"
    Exit Sub
End If
For Each nesne In Me.Controls
    If TypeName(nesne) = "TextBox" Or TypeName(nesne) = "ComboBox" Then
        If nesne.Tag <> "" Then
            sh.Cells(sat, nesne.Tag).Value = nesne.Value
        End If
    End If
Next
If OptionButton1.Value = True Then
    sh.Cells(sat, "I").Value = OptionButton1.Caption
    ElseIf OptionButton2.Value = True Then
    sh.Cells(sat, "I").Value = OptionButton2.Caption
End If
sh.Cells(sat, "A").Value = sat - 1
sh.Cells(sat, "F").Value = CDate(TextBox4.Text)
sh.Cells(sat, "F").NumberFormat = "dd.mm.yyyy"
sh.Cells(sat, "H").Value = CDate(TextBox5.Text)
sh.Cells(sat, "H").NumberFormat = "dd.mm.yyyy"
sh.Cells(sat, "K").Value = CDate(TextBox7.Text)
sh.Cells(sat, "K").NumberFormat = "dd.mm.yyyy"
If OptionButton3.Value = True Then
    sh.Cells(sat, "L").Value = OptionButton3.Caption
    ElseIf OptionButton4.Value = True Then
    sh.Cells(sat, "L").Value = OptionButton4.Caption
End If


TextBox1 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""
TextBox10 = ""
TextBox11 = ""
TextBox13 = ""
ComboBox1 = ""
ComboBox2 = ""
ComboBox3 = ""
ComboBox4 = ""
TextBox1.SetFocus
MsgBox "Kayıt Başarı ile girildi." & vbLf & vbLf _
& "evrengizlen@hotmail.com", vbOKOnly + vbInformation, "E V R E N"
End Sub
 

Ekli dosyalar

Hocam göndermiş olduğunuz çalışmada ilk soruma dair sorun yok fakat UserForm2'de önceden verileri sayfa1'e kaydettiğim için listboxa verileri alabiliyordum. Şimdi ise verileri sayfa1'e değilde BR, BRPO, KG sayfalarına kayıt yapacağım için listboxa combobox yardımıyla tekrar nasıl çağırabilirim.
 
Hocam göndermiş olduğunuz çalışmada ilk soruma dair sorun yok fakat UserForm2'de önceden verileri sayfa1'e kaydettiğim için listboxa verileri alabiliyordum. Şimdi ise verileri sayfa1'e değilde BR, BRPO, KG sayfalarına kayıt yapacağım için listboxa combobox yardımıyla tekrar nasıl çağırabilirim.
Dosyayı güncelledim.6 numaralı mesajdan indirebilirsiniz.:cool:
 
Geri
Üst