katip16487
Altın Üye
- Katılım
- 28 Haziran 2007
- Mesajlar
- 168
- Excel Vers. ve Dili
- OFFİCE 2016 (Türkçe)
- Altın Üyelik Bitiş Tarihi
- 17-03-2025
Merhabalar, Excel 2010 kullanıyorum.
Excel tabanlı şekilde VBA ile verileri excelden userforma çekerek ve userforma girilen verilen ise anında excele aktarılması suretiyle bir program yaptım.
Program kodlarında hata olmaya başlayınca, kodları yeniden tek tek deneyerek yazmaya başladım.
İnitalize, Activate ve Combobox ile ilgili kodlarda hata oluşmadı.
TextBox1'in kodlarını girdiğimde de oluşmadı.
Ancak, textbox2 kodlarını girdikten sonra textbox2'ye veri girmeye çalıştığımda
"Automation Error, The object invoked has disconnect from is clients" hatası alıyorum.
Bir türlü çözemedim gitti.
Userform üzerinde 25 textbox, 11 combobox, 5 label bulunmaktadır.
İNİTALİZEDE YER ALAN KODLAR
TextBox1.Text = Format(Sheets("bilgigirisi").Range("B4").Value, "#,##0.00")
TextBox2.Text = Format(Sheets("bilgigirisi").Range("B5").Value, "#,##0.00")
.
.
.
Label29.Caption = Format(Sheets("bilgigirisi").Range("B6").Value, "#,##0.00")
.
.
.
.
Label34.Caption = Sheets("bilgigirisi").Range("E9").Text
Label35.Caption = Sheets("bilgigirisi").Range("I2").Text
TEXTBOX'LARIN OLAYLARI...
' TEXTBOX OLAYLARI
Private Sub TextBox1_Change()
On Error Resume Next
Selection.NumberFormat = "#,##0.00"
Sheets("bilgigirisi").Range("B4").Value = CDbl(TextBox1.Value)
Sheets("bilgigirisi").Range("B4").NumberFormat = "#,##0.00"
Label29.Caption = Format(Sheets("bilgigirisi").Range("B6").Text, "#,##0.00")
Label32.Caption = Format(Sheets("bilgigirisi").Range("C11").Text, "#,##0.00")
Label33.Caption = Format(Sheets("bilgigirisi").Range("C12").Text, "#,##0.00")
Label35.Caption = Sheets("bilgigirisi").Range("I2")
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1.Text = "" Then
MsgBox "Bu alanı boş geçemezsiniz.", vbCritical, "Hatalı Giriş"
Cancel = True
TextBox1.SetFocus
End If
TextBox1.Text = Format(TextBox1, "#,##0.00")
End Sub
Private Sub TextBox2_Change()
On Error Resume Next
Selection.NumberFormat = "#,##0.00"
Sheets("bilgigirisi").Range("B5").Value = CDbl(TextBox2.Value)
Sheets("bilgigirisi").Range("B5").NumberFormat = "#,##0.00"
Label29.Caption = Format(Sheets("bilgigirisi").Range("B6").Text, "#,##0.00")
Label32.Caption = Format(Sheets("bilgigirisi").Range("C11").Text, "#,##0.00")
Label33.Caption = Format(Sheets("bilgigirisi").Range("C12").Text, "#,##0.00")
Label35.Caption = Sheets("bilgigirisi").Range("I2")
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Sheets("bilgigirisi").Range("B5").Value > Sheets("bilgigirisi").Range("B4").Value Then
MsgBox "Kabul büyük olamaz.", vbCritical, "Hatalı Giriş"
Cancel = True
TextBox2.SetFocus
End If
TextBox2.Text = Format(TextBox1, "#,##0.00")
End Sub
İlgilenip cevap vereceklere şimdiden teşekkür ederim...
Excel tabanlı şekilde VBA ile verileri excelden userforma çekerek ve userforma girilen verilen ise anında excele aktarılması suretiyle bir program yaptım.
Program kodlarında hata olmaya başlayınca, kodları yeniden tek tek deneyerek yazmaya başladım.
İnitalize, Activate ve Combobox ile ilgili kodlarda hata oluşmadı.
TextBox1'in kodlarını girdiğimde de oluşmadı.
Ancak, textbox2 kodlarını girdikten sonra textbox2'ye veri girmeye çalıştığımda
"Automation Error, The object invoked has disconnect from is clients" hatası alıyorum.
Bir türlü çözemedim gitti.
Userform üzerinde 25 textbox, 11 combobox, 5 label bulunmaktadır.
İNİTALİZEDE YER ALAN KODLAR
TextBox1.Text = Format(Sheets("bilgigirisi").Range("B4").Value, "#,##0.00")
TextBox2.Text = Format(Sheets("bilgigirisi").Range("B5").Value, "#,##0.00")
.
.
.
Label29.Caption = Format(Sheets("bilgigirisi").Range("B6").Value, "#,##0.00")
.
.
.
.
Label34.Caption = Sheets("bilgigirisi").Range("E9").Text
Label35.Caption = Sheets("bilgigirisi").Range("I2").Text
TEXTBOX'LARIN OLAYLARI...
' TEXTBOX OLAYLARI
Private Sub TextBox1_Change()
On Error Resume Next
Selection.NumberFormat = "#,##0.00"
Sheets("bilgigirisi").Range("B4").Value = CDbl(TextBox1.Value)
Sheets("bilgigirisi").Range("B4").NumberFormat = "#,##0.00"
Label29.Caption = Format(Sheets("bilgigirisi").Range("B6").Text, "#,##0.00")
Label32.Caption = Format(Sheets("bilgigirisi").Range("C11").Text, "#,##0.00")
Label33.Caption = Format(Sheets("bilgigirisi").Range("C12").Text, "#,##0.00")
Label35.Caption = Sheets("bilgigirisi").Range("I2")
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1.Text = "" Then
MsgBox "Bu alanı boş geçemezsiniz.", vbCritical, "Hatalı Giriş"
Cancel = True
TextBox1.SetFocus
End If
TextBox1.Text = Format(TextBox1, "#,##0.00")
End Sub
Private Sub TextBox2_Change()
On Error Resume Next
Selection.NumberFormat = "#,##0.00"
Sheets("bilgigirisi").Range("B5").Value = CDbl(TextBox2.Value)
Sheets("bilgigirisi").Range("B5").NumberFormat = "#,##0.00"
Label29.Caption = Format(Sheets("bilgigirisi").Range("B6").Text, "#,##0.00")
Label32.Caption = Format(Sheets("bilgigirisi").Range("C11").Text, "#,##0.00")
Label33.Caption = Format(Sheets("bilgigirisi").Range("C12").Text, "#,##0.00")
Label35.Caption = Sheets("bilgigirisi").Range("I2")
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Sheets("bilgigirisi").Range("B5").Value > Sheets("bilgigirisi").Range("B4").Value Then
MsgBox "Kabul büyük olamaz.", vbCritical, "Hatalı Giriş"
Cancel = True
TextBox2.SetFocus
End If
TextBox2.Text = Format(TextBox1, "#,##0.00")
End Sub
İlgilenip cevap vereceklere şimdiden teşekkür ederim...