DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
For i = 1 To 2
If Controls("Textbox" & i) = "" Then
MsgBox "Veri Girişi Eksiktir.!", vbInformation, "[URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
TextBox1.SetFocus
Exit Sub
End If
Next i
son = [A65536].End(3).Row + 1
Range("A" & son) = son - 1
Range("B" & son) = TextBox1.Text
Range("C" & son) = TextBox2.Text
TextBox1 = "": TextBox2 = ""
TextBox1.SetFocus
End Sub
Private Sub CommandButton1_Click()
[COLOR=green]'*****Texbox'lara eksik veri girişi kontrolü için döngü kuruldu.*****[/COLOR]
For i = 1 To 2 [COLOR=#008000]' 2 tane textbox olduğu için [/COLOR]
If Controls("Textbox" & i) = "" Then
MsgBox "Veri Girişi Eksiktir.!", vbInformation, "[URL="http://www.excel.web.tr/"]www.excel.web.tr[/URL]"
TextBox1.SetFocus
Exit Sub
End If
Next i
[COLOR=green]'***************** Döngü bitimi *******************************[/COLOR]
son = [A65536].End(3).Row + 1 [COLOR=green]' A sütununda son satırdan bir sonraki bulunur.[/COLOR]
Range("A" & son) = son - 1 [COLOR=green]' A sütununa sıra no yazılır.[/COLOR]
Range("B" & son) = TextBox1.Text[COLOR=green] ' B sütununa ad yazılır.[/COLOR]
Range("C" & son) = TextBox2.Text [COLOR=green]' C sürununa soyad yazlır.[/COLOR]
TextBox1 = "": TextBox2 = "" [COLOR=green]' Veri girişinden sonra textboxlar temizlenir.[/COLOR]
TextBox1.SetFocus[COLOR=green] ' veri girişinden sonra imleç textbox1 e gider.[/COLOR]
End Sub