Değiştir ve Sil Makro hatası

Katılım
13 Ocak 2008
Mesajlar
14
Excel Vers. ve Dili
excel 2003 türkçe
Excelde biraz acemiyim. ekli dosyada değiştir ve sil makrosunda problem var.
yardımcı olursanız sevinirim. şimdiden teşekkürler.
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
41,563
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Selamlar,

Formunaza ait kodların tümünü silip aşağıdakileri uygulayıp denermisiniz.

Kod:
Private Sub Adresleri_Güncelle_Click() 'Adres ve Öğrenci Güncelleme
Sheets("Adresler").Visible = True
Sheets("Adresler").Select
If ComboBox2.Text = "" Then
MsgBox "Lütfen ÖĞRENCİNİN ADINI-SOYADINI bulunuz!!!"
Exit Sub
End If
Cells(ComboBox2.ListIndex + 5, 1).Select
ActiveCell.Offset(0, 1).Value = ComboBox2.Value 'Öğrencinin Adı
ActiveCell.Offset(0, 2).Value = TextBox9.Value 'Sınıfı
ActiveCell.Offset(0, 3).Value = TextBox10.Value 'Numarası
ActiveCell.Offset(0, 4).Value = TextBox6.Value 'Mesleği
ActiveCell.Offset(0, 5).Value = TextBox41.Value 'İşyeri Adı
ActiveCell.Offset(0, 6).Value = TextBox4.Value 'İşyeri Adresi
ActiveCell.Offset(0, 7).Value = TextBox3.Value 'Ustasının Adı
ActiveCell.Offset(0, 8).Value = TextBox5.Value 'İş Telefonu
ActiveCell.Offset(0, 9).Value = TextBox7.Value 'Meslek Odası
ComboBox2.Text = ""
TextBox41.Value = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
MsgBox ">>>>> &#304;&#350;LEM TAMAMLANMI&#350;TIR. <<<<<"
Sheets("Ana Sayfa").Visible = True
Sheets("Adresler").Visible = True
End Sub
Private Sub &#214;&#287;renci_Getir_Click() '&#214;&#287;renci Getir
Sheets("Adresler").Visible = True
Sheets("Adresler").Select
If ComboBox2.Text = "" Then
MsgBox "L&#252;tfen &#214;&#286;RENC&#304;N&#304;N ADINI-SOYADINI Giriniz!!!"
Exit Sub
End If
   For Each hucre In Range("b5:b" & WorksheetFunction.CountA(Range("b1:b6500")) + 4)
   If StrConv(hucre.Value, vbUpperCase) = StrConv(ComboBox2.Value, vbUpperCase) Then
   hucre.Select
   End If
   Next
TextBox41.Value = ActiveCell.Offset(0, 4).Value
TextBox3.Value = ActiveCell.Offset(0, 6).Value
TextBox4.Value = ActiveCell.Offset(0, 5).Value
TextBox5.Value = ActiveCell.Offset(0, 7).Value
TextBox6.Value = ActiveCell.Offset(0, 3).Value
TextBox7.Value = ActiveCell.Offset(0, 8).Value
TextBox8.Value = ActiveCell.Offset(0, 0).Value
TextBox9.Value = ActiveCell.Offset(0, 1).Value
TextBox10.Value = ActiveCell.Offset(0, 2).Value
Run "S&#305;rala"
Cells(ComboBox2.ListIndex + 5, 1).Select
Sheets("Ana Sayfa").Visible = True
Sheets("Adresler").Visible = True
Exit Sub
End Sub
Private Sub &#214;&#287;renci_Sil_Click() 'Kay&#305;t Sil
If ComboBox2.Text = "" Then
MsgBox "L&#252;tfen &#214;&#286;RENC&#304;N&#304;N ADINI-SOYADINI bulunuz!!!"
Exit Sub
End If
Sat&#305;r = ActiveCell.Row
Rows(Sat&#305;r).Delete Shift:=xlUp
ComboBox2.Text = ""
TextBox41.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
For X = 5 To [B65536].End(3).Row
Cells(X, 1) = X - 4
Next
MsgBox "KAYIT S&#304;L&#304;ND&#304;!!!"
End Sub
Private Sub UserForm_Initialize()
Set S7 = Sheets("Adresler")
S7.Select
ComboBox2.RowSource = "Adresler!b5:b" & S7.[b65000].End(3).Row
Me.Top = 40
Me.Left = 100
End Sub
 
Katılım
13 Ocak 2008
Mesajlar
14
Excel Vers. ve Dili
excel 2003 türkçe
te&#351;ekk&#252;rler. &#231;ok i&#351;ime yarad&#305;.
 
Üst