• DİKKAT

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

excel vba textbox yinelenen değerleri gösterme

Katılım
17 Aralık 2019
Mesajlar
31
Excel Vers. ve Dili
2010
Merhabalar,
textbox1 deki değer Set S2 = Application.Workbooks("Araç Data").Sheets("Araç Data").Cells(sonsatir, 1).Value var ise beni uyarmasını ve işlemin devam edip etmeyeceğini bana sormasını istiyorum.
Değerli desteklerinizi rica ederim.



Private Sub btndatayaaktar_Click()
Dim S2 As Worksheet
Dim X As Long

If TextBox1 <> "" And TextBox2 <> "" And TextBox3 <> "" And TextBox4 <> "" And TextBox5 <> "" And CheckBox1 <> "" And CheckBox2 <> "" And CheckBox3 <> "" And CheckBox4 <> "" And CheckBox5 <> "" And CheckBox6 <> "" And CheckBox7 <> "" And CheckBox8 <> "" Then
Application.Workbooks.Open ("C:\Users\sezene\Desktop\Tuborg Makro Çalışma\Araç Data.xlsx")
Set S2 = Application.Workbooks("Araç Data").Sheets("Araç Data")
sonsatir = WorksheetFunction.CountA(S2.Range("A:A")) + 1

S2.Cells(sonsatir, 1).Value = TextBox1.Value
S2.Cells(sonsatir, 3).Value = TextBox2.Value
S2.Cells(sonsatir, 5).Value = TextBox3.Value
S2.Cells(sonsatir, 6).Value = TextBox4.Value
S2.Cells(sonsatir, 8).Value = TextBox5.Value
S2.Cells(sonsatir, 2).Value = CheckBox1.Value
S2.Cells(sonsatir, 2).Value = CheckBox2.Value
S2.Cells(sonsatir, 4).Value = CheckBox3.Value
S2.Cells(sonsatir, 4).Value = CheckBox4.Value
S2.Cells(sonsatir, 7).Value = CheckBox5.Value
S2.Cells(sonsatir, 7).Value = CheckBox6.Value
S2.Cells(sonsatir, 9).Value = CheckBox7.Value
S2.Cells(sonsatir, 9).Value = CheckBox8.Value

Set S2 = Nothing
Application.Workbooks("Araç Data").Close Savechanges:=True
MsgBox "İşleminiz Tamamlandı.", vbInformation, "Bilgi"

TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
CheckBox1 = ""
CheckBox2 = ""
CheckBox3 = ""
CheckBox4 = ""
CheckBox5 = ""
CheckBox6 = ""
CheckBox7 = ""
CheckBox8 = ""

Else
MsgBox " Boş bırakılan yerleri doldurunuz!..", vbExclamation, "Uyarı !!!"
End If

End Sub
 
sorunumu çözdüm bilginize
 
Geri
Üst