Kodlar neden çalışmıyor.

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Katılım
7 Ekim 2004
Mesajlar
53
Excel Vers. ve Dili
2003 Türkçe
Aşağıda yazılı kodu çalıştırdığımda;
Comple error:
Block If without End If hatası veriyor.

Private Sub CommandButton11_Click()
On Error Resume Next

Cevap = MsgBox(" Bu kişinin Kesin kaydı yapılsınmı?", vbYesNo)
If Cevap = 6 Then
Sheets("Sayfa4").Select
Range("S1:S10").ClearContents
Range("S1").Value = TextBox1.Text
Range("S2").Value = TextBox25.Text
Range("S3").Value = ComboBox1.Text
Range("S4").Value = TextBox7.Text
Range("S5").Value = TextBox8.Text
Range("S6").Value = TextBox9.Text
Range("S7").Value = TextBox10.Text
Range("S8").Value = TextBox23.Text
Range("T29").Value = TextBox26.Text
Range("T30").Value = TextBox27.Text
Range("T31").Value = TextBox28.Text
Range("T32").Value = TextBox29.Text
Range("S1:S8").Select
Selection.Copy
Sheets("GÜN").Select
Range("B65536").End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlValues, Transpose:=True
Application.CutCopyMode = False
Sheets("Beyan").Select 'Beyanname sayfasını seç
Range("S1:Z4").ClearContents 'Temizle
If TextBox22 <> "" Then
Range("S1").Value = TextBox22.Text
Range("U1").Value = ComboBox2.Text
Range("T1").Value = TextBox26.Text
Range("X1").Value = TextBox30.Text
Range("V1").Value = TextBox7.Text
Range("W1").Value = TextBox8.Text
Range("Y1").Value = TextBox10.Text
Range("Z1").Value = TextBox23.Text
Else
End If

If TextBox14 <> "" Then
Range("S2").Value = TextBox14.Text
Range("U2").Value = ComboBox3.Text
Range("T2").Value = TextBox27.Text
Range("X2").Value = TextBox31.Text
Range("V2").Value = TextBox7.Text
Range("W2").Value = TextBox8.Text
Range("Y2").Value = TextBox10.Text
Range("Z2").Value = TextBox23.Text
Else
End If
If TextBox25 <> "" Then
Range("S3").Value = TextBox15.Text
Range("U3").Value = ComboBox4.Text
Range("T3").Value = TextBox28.Text
Range("X3").Value = TextBox32.Text
Range("V3").Value = TextBox7.Text
Range("W3").Value = TextBox8.Text
Range("Y3").Value = TextBox10.Text
Range("Z3").Value = TextBox23.Text
Else
End If
If TextBox16.Text = "<>" Then
If TextBox16 <> "" Then
Range("S4").Value = TextBox16.Text
Range("U4").Value = ComboBox5.Text
Range("T4").Value = TextBox29.Text
Range("X4").Value = TextBox33.Text
Range("V4").Value = TextBox7.Text
Range("W4").Value = TextBox8.Text
Range("Y4").Value = TextBox10.Text
Range("Z4").Value = TextBox23.Text
Else
End If
Range("S1:Z4").Select
Selection.Copy
Sheets("GÜN").Select
Range("B65536").End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlValues
'Application.CutCopyMode = False
Sheets("Sayfa4").Select
Range("a1").Select
Exit Sub
End If
End Sub
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst