• DİKKAT

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

userform dan excele aktarmak

Katılım
19 Aralık 2006
Mesajlar
60
Excel Vers. ve Dili
excelxp
eklediğim dosyadaki bilgileri excel sayfasına aktarmak istiyorum lütfen yardım
 
Ekli dosyayı inceleyiniz.Yanlış nesne seçimi yapmışsınız.Veri girebilmek için textbox veya combobox seçmelisiniz.Siz listbox seçmişsiniz.Ben onları textbox yaptım.:cool:
Kod:
Private Sub CommandButton1_Click()
Dim say As Byte, i As Integer, sat As Long
If Not IsDate(TextBox1.Value) Then
    MsgBox "Yanlış tarih girdiniz.Geçerli bir tarih giriniz..!!", vbCritical
    TextBox1.SetFocus
    Exit Sub
End If
sat = Cells(65536, "A").End(xlUp).Row + 1
Cells(sat, "A").Value = CDate(TextBox1.Value)
Cells(sat, "A").NumberFormat = "dd.mm.yyyy"
For i = 2 To 256
    If LCase(Replace(Replace(Cells(2, i).Value, "I", "ı"), "İ", "i")) = LCase(Replace(Replace(Label1.Caption, "I", "ı"), "İ", "i")) Then
        Cells(sat, i).Value = TextBox1.Value * 1
        say = 1
    End If
    If LCase(Replace(Replace(Cells(2, i).Value, "I", "ı"), "İ", "i")) = LCase(Replace(Replace(Label10.Caption, "I", "ı"), "İ", "i")) Then
        Cells(sat, i).Value = TextBox2.Value
        say = 1
    End If
    If LCase(Replace(Replace(Cells(2, i).Value, "İ", "i"), "I", "ı")) = LCase(Replace(Replace(Label9.Caption, "I", "ı"), "İ", "i")) Then
        Cells(sat, i).Value = TextBox3.Value
        say = 1
    End If
    If LCase(Replace(Replace(Cells(2, i).Value, "İ", "i"), "I", "ı")) = LCase(Replace(Replace(Label8.Caption, "I", "ı"), "İ", "i")) Then
        Cells(sat, i).Value = TextBox4.Value * 1
        say = 1
    End If
Next i
    If say = 1 Then
        MsgBox "Veriler aktarıldı.", vbOKOnly + vbInformation
        Else
        MsgBox "Aktarma Yapılmadı..", vbCritical
    End If
End Sub

Kod:
Private Sub TextBox1_AfterUpdate()
If IsDate(TextBox1.Value) Then
    TextBox1.Value = Format(TextBox1.Value, "dd.mm.yyyy")
End If
End Sub

Kod:
Private Sub UserForm_Initialize()
Sheets("girişler").Select
TextBox1.SetFocus
End Sub
 
emeğine sağlık bir ricam daha olacak textboksların hepsine bilgi girişi yapmak istiyorum birde yeni kayıt butonu
 
dogandündar;203076' Alıntı:
emeğine sağlık bir ricam daha olacak textboksların hepsine bilgi girişi yapmak istiyorum birde yeni kayıt butonu
Listbox'ları silin onun yerine textbox'ları ekleyin.
Labellerede captionununda yazın.Benim yolladığım kodları inceleyerek,kodları yeni textbox'lara göre uyarlayabilirsiniz.:cool:
 
Geri
Üst