• DİKKAT

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

İki UserForm üzerindeki Kodları Tek UserForm Yapmak

vardar07

Destek Ekibi
Destek Ekibi
Katılım
19 Mart 2008
Mesajlar
2,154
Excel Vers. ve Dili
Office 2007 Enterprise
Türkçe
Arkadaşlar Başlıktanda anlaşılacağı üzere bir dosyada iki userformu birleştirip tek userform yapmaya çalışıyorum ancak 2 gündür beceremedim sizlerin görüşlerinizi almak istedim.
 

Ekli dosyalar

Arkadaşlar kodları internetten buldum yokmu yardım.
Kod:
 Private Sub CommandButton1_Click()
Dim x As Integer
Z = Sayfa1.UsedRange.Rows.Count
x = TextBox1
temp = 0
For i = 2 To Z
If Cells(i, 1) = x Then
temp = 1
Exit For
End If
Next
If temp = 0 Then
zeile = i
Else
MsgBox "kayıt yok"
texbox1 = ""
End If
End Sub
Private Sub CommandButton2_Click()
TextBox1 = ""
End Sub
Private Sub CommandButton3_Click()
If TextBox2 = "" And TextBox3 = "" And TextBox4 = "" Then
Sayfa1.Rows(zeile).Delete
End If
Cells(zeile, 1) = TextBox2.Value
Cells(zeile, 2) = TextBox3.Value
Cells(zeile, 3) = TextBox4.Value
Cells(zeile, 4) = TextBox5.Value
Unload Me
End Sub
Private Sub CommandButton4_Click()
TextBox1 = ""
TextBox2 = Cells(zeile, 2)
TextBox3 = Cells(zeile, 3)
TextBox4 = Cells(zeile, 4)
End Sub
Private Sub CommandButton5_Click()
End
Unload Me
End Sub
Private Sub UserForm_Initialize()
TextBox1 = Cells(zeile, 2)
TextBox2 = Cells(zeile, 3)
TextBox3 = Cells(zeile, 4)
TextBox4 = Cells(zeile, 5)
End Sub
 
Geri
Üst