Merhaba arkadaşlar;
aşağıdaki kodda 7 satırdan itibaren form da yazdıklarımı listelemesini istiyorum fakat kodu çalıştırdığımda kod içerisinde bulunan mesajlardan "Kayıt işlemi gerçekleşti" mesajı geliyor...
excelde ilgili sayfa da ilk yedi satır birletirilmiştir.
ornek dosyayıda ekledim
aşağıdaki kodda 7 satırdan itibaren form da yazdıklarımı listelemesini istiyorum fakat kodu çalıştırdığımda kod içerisinde bulunan mesajlardan "Kayıt işlemi gerçekleşti" mesajı geliyor...
excelde ilgili sayfa da ilk yedi satır birletirilmiştir.
ornek dosyayıda ekledim
Kod:
Private Sub CommandButton1_Click()
On Error Resume Next
Sheets("kurulum").Select
Dim bak As Range '****
Dim say As Integer
For Each bak In Range("A7:A" & WorksheetFunction.CountA(Range("A7:A65000")))
If bak.Value = TextBox1.Value Then
MsgBox "Kayıt İşlemi Gerçekleşti"
Exit Sub
End If
If TextBox1.Text = "" Then
MsgBox "Lütfen önce isim girin...", , "Kayıt Hatası!!!"
Exit Sub
End If
Next bak
For Each bak In Range("B7:B" & WorksheetFunction.CountA(Range("B7:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(TextBox1.Value, vbUpperCase) Then
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B7:B65500"))
TextBox19.Value = say
Cells(say + 1, 1).Value = TextBox19.Value
Cells(say + 1, 2).Value = TextBox1.Value
Cells(say + 1, 3).Value = TextBox2.Value
Cells(say + 1, 4).Value = TextBox3.Value
Cells(say + 1, 5).Value = TextBox4.Value
Cells(say + 1, 6).Value = TextBox5.Value
Cells(say + 1, 7).Value = TextBox6.Value
Cells(say + 1, 8).Value = TextBox7.Value
Cells(say + 1, 9).Value = TextBox8.Value
Cells(say + 1, 10).Value = TextBox9.Value
Cells(say + 1, 11).Value = TextBox10.Value
Cells(say + 1, 12).Value = TextBox11.Value
Cells(say + 1, 13).Value = TextBox12.Value
Cells(say + 1, 14).Value = TextBox13.Value
Cells(say + 1, 15).Value = TextBox14.Value
Range("A7:A65500").Select
MsgBox "Yeni Kayıt Başarıyla Yapılmıştır.", vbInformation, "Sn. " & Application.UserName
Selection.Sort Key1:=Range("A7"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
'************************
Range("B7:U65500").Select
Selection.Sort Key1:=Range("B7"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B7").Select '*********
TextBox19.Value = WorksheetFunction.Count(Range("A7:A65500")) + 1
CommandButton1_Click
TextBox17 = Sheets("kurulum").Range("AB7").Value
TextBox18 = Sheets("kurulum").Range("AC1").Value
TextBox1.SetFocus
Unload kurulum
kurulum.Show
End Sub
