Skip to main content

AccessTr.neT


Run-time error '424': Object required hatası

Run-time error '424': Object required hatası

Çözüldü #5
Sn:mumya66
Hazırlamış olduğunuz programdaki hatalar.Sırası ile aşağıdaki gibi düzeltiniz ayrıca tebrik ederim kopyala yapıştır yerine kodları yazarak deneyip hata verincede yardım istediğin için.

Sayfa üzerindeki Form açma butonundaki hatalı kod

Kod:
Private Sub CommandButton1_Click()
Userfrom1.Show
End Sub

Yerine yazılacak düzeltilmiş kod

Kod:
Private Sub CommandButton1_Click()
UserForm1.Show
End Sub

Userform1 deki Kodlar

Kaydet butonundaki hatalı kod

Kod:
Private Sub CommandButton1_Click()
b = WorksheetFunction.CountA(Sheets("Veri").Range("A:A"))
Sheets("Veri").Range("a" & b + 1).Select
Activelcell = ComboBox1.Value
ActiveCell.Offset(0, 1) = texbox1.Value
ActiveCell.Offset(0, 2) = texbox2.Value
ActiveCell.Offset(0, 3) = texbox3.Value
ActiveCell.Offset(0, 4) = texbox4.Value
ActiveCell.Offset(0, 5) = texbox5.Value
ActiveCell.Offset(0, 6) = texbox6.Value
ActiveWorkbook.Save
MsgBox "verileriniz kayıt yapıldı", , "www.accesstr.net"
CommandButton5_Click
End Sub

Yerine yazılacak düzeltilmiş kod

Kod:
Private Sub CommandButton1_Click()
b = WorksheetFunction.CountA(Sheets("Veri").Range("A:A"))
Sheets("Veri").Range("a" & b + 1).Select
ActiveCell = ComboBox1.Value
ActiveCell.Offset(0, 1) = TextBox1.Value
ActiveCell.Offset(0, 2) = TextBox2.Value
ActiveCell.Offset(0, 3) = TextBox3.Value
ActiveCell.Offset(0, 4) = TextBox4.Value
ActiveCell.Offset(0, 5) = TextBox5.Value
ActiveCell.Offset(0, 6) = TextBox6.Value
ActiveWorkbook.Save
MsgBox "verileriniz kayıt yapıldı", , "www.accesstr.net"
CommandButton5_Click
End Sub

Bul butonundaki hatalı kod

Kod:
Private Sub CommandButton2_Click()
For Each hucre In Range("a2:a" & WorksheetFunction.CountA(Range("a1:a65000")))
If strcovn(hucre.volue, vbUpperCase) = strcovn(ComboBox1.volue, vbUpperCase) Then
hucre.Select
texbox1 = ActiveCell.Offset(0.1).volue
texbox1 = ActiveCell.Offset(0.2).volue
texbox1 = ActiveCell.Offset(0.3).volue
texbox1 = ActiveCell.Offset(0.4).volue
texbox1 = ActiveCell.Offset(0.5).volue
texbox1 = ActiveCell.Offset(0.6).volue
End If
Next
End Sub

Yerine yazılacak düzeltilmiş kod

Kod:
Private Sub CommandButton2_Click()
For Each hucre In Range("a2:a" & WorksheetFunction.CountA(Range("a1:a65000")))
If StrConv(hucre.Value, vbUpperCase) = StrConv(ComboBox1.Value, vbUpperCase) Then
hucre.Select
TextBox1 = ActiveCell.Offset(0, 1).Value
TextBox2 = ActiveCell.Offset(0, 2).Value
TextBox3 = ActiveCell.Offset(0, 3).Value
TextBox4 = ActiveCell.Offset(0, 4).Value
TextBox5 = ActiveCell.Offset(0, 5).Value
TextBox6 = ActiveCell.Offset(0, 6).Value
End If
Next
End Sub

Düzelt Butonundaki hatalı kod

Kod:
Private Sub CommandButton3_Click()
ActiveCell.Offset(0, 1).volue = texbox1.volue
ActiveCell.Offset(0, 2).volue = texbox2.volue
ActiveCell.Offset(0, 3).volue = texbox3.volue
ActiveCell.Offset(0, 4).volue = texbox4.volue
ActiveCell.Offset(0, 5).volue = texbox5.volue
ActiveCell.Offset(0, 6).volue = texbox6.volue
activecellworkbook.Save
MsgBox "verileriniz kayıt yapıldı", , "www.accesstr.net"
CommandButton5_Click
End Sub

Yerine yazılacak düzeltilmiş kod

Kod:
Private Sub CommandButton3_Click()
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
ActiveCell.Offset(0, 3).Value = TextBox3.Value
ActiveCell.Offset(0, 4).Value = TextBox4.Value
ActiveCell.Offset(0, 5).Value = TextBox5.Value
ActiveCell.Offset(0, 6).Value = TextBox6.Value
ActiveWorkbook.Save
MsgBox "verileriniz kayıt yapıldı", , "www.accesstr.net"
CommandButton5_Click
End Sub

Sil Butonundaki hatalı kod

Kod:
Private Sub CommandButton4_Click()
Dim cevap
Dim i
cevap = MsgBox("seçili kaydı silmek istediginizden eminmisiniz ?", yesno + vbQuestion, , "www.accesstr.net")
If cevap = vbYes Then
Selection.EntireRow.Delete
End If
Range("A1").Select
MsgBox "Verileriniz silindi", , "www.accesstr.net"
ActiveWorkbook.Save
CommandButton5_Click
End Sub

Yerine yazılacak düzeltilmiş kod

Kod:
Private Sub CommandButton4_Click()
Dim cevap
Dim i
cevap = MsgBox("seçili kaydı silmek istediginizden eminmisiniz ?", vbYesNo + vbQuestion, "www.accesstr.net")
If cevap = vbYes Then
Selection.EntireRow.Delete
End If
Range("A1").Select
MsgBox "Verileriniz silindi", , "www.accesstr.net"
ActiveWorkbook.Save
CommandButton5_Click
End Sub

Temizle butonundaki hatalı kod

Kod:
Private Sub CommandButton5_Click()
ComboBox1 = ""
testbox1 = ""
testbox2 = ""
testbox3 = ""
testbox4 = ""
testbox5 = ""
testbox6 = ""
End Sub

Yerine yazılacak düzeltilmiş kod

Kod:
Private Sub CommandButton5_Click()
ComboBox1 = ""
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
End Sub

Kapat butonundaki hatalı kod

Kod:
Private Sub CommandButton6_Click()
ActiveWorkbook.Save
MsgBox "program kapatılıyor", , "www.accesstr.net"
Application.qouit
End
End Sub

Yerine yazılacak düzeltilmiş kod

Kod:
Private Sub CommandButton6_Click()
ActiveWorkbook.Save
MsgBox "program kapatılıyor", , "www.accesstr.net"
Application.Quit
End
End Sub

Hatlı ve düzeltilmiş olarak verilen kodları karşılaştırıp hatalarınızın nerelerde olduğunu anlamanız daha basit olacağı için birlikte yazılımıştır.Programın düzeltilmiş şekli aşağıdadır.
.rar deneme son_mumya66.rar (Dosya Boyutu: 20,69 KB | İndirme Sayısı: 59)
OĞULCAN & OLCAYTUĞ

Oğulcan Excel Web Sitesi
Excel İle Programlama
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Cvp: Run-time error '424': Object required hatası - Yazar: ogulcan92 - 14/08/2010, 10:03
Task