Güncelleme işlemindeki bir hata

Katılım
23 Temmuz 2007
Mesajlar
178
Excel Vers. ve Dili
2003 Türkçe
Merhaba,

buton 62, daha önceden tablo içersinde bulunan satırların combobox ve textbox'lara alınması sonrası, yapılan değişiklikleri tekrar aynı satıra aktarmayı sağlamaktadır. güncellenen satırın numarası Textbox 25 de gösterilmesi istenmektedir. Ancak, buraya A1 hücresinin değeri atanmaktadır. Bu hatayı düzeltmek için aşağıdaki kodda nasıl bir değişiklik yapmak gerekecekir?

İyi çalışmalar
Saygılarımla

Private Sub CommandButton62_Click()
ActiveSheet.Unprotect
If TextBox25.Value = "" Then
MsgBox "Güncelleme için herhangi bir değiştirilecek bir veri yok!!!"
Exit Sub

Else

Dim aktifdeger As Integer
aktifdeger = CInt(TextBox25.Text) + 1
Cells(aktifdeger, 2) = ComboBox18.Value
Cells(aktifdeger, 3) = ComboBox12.Value
Cells(aktifdeger, 4) = TextBox9.Value
Cells(aktifdeger, 5) = TextBox4.Value
Cells(aktifdeger, 6) = TextBox5.Value
Cells(aktifdeger, 7) = ComboBox3.Value
Cells(aktifdeger, 8) = TextBox26.Value
Cells(aktifdeger, 9) = TextBox8.Value
Cells(aktifdeger, 10) = TextBox24.Value
Cells(aktifdeger, 11) = ComboBox9.Value
Cells(aktifdeger, 12) = ComboBox11.Value
Cells(aktifdeger, 13) = ComboBox15.Value
Cells(aktifdeger, 14) = ComboBox19.Value
Cells(aktifdeger, 15) = ComboBox4.Value
Cells(aktifdeger, 16) = ComboBox4.Value
Cells(aktifdeger, 17) = ComboBox6.Value
Cells(aktifdeger, 18) = TextBox12.Value
Cells(aktifdeger, 19) = ComboBox10.Value
Cells(aktifdeger, 20) = TextBox20.Value
Cells(aktifdeger, 21) = TextBox18.Value

'nesneler temileniyor ve s.no atanıyor

'Range("A1").Select
'Do While Not IsEmpty(ActiveCell)
'ActiveCell.Offset(1, 0).Select
'Loop
'txtSNo.Value = ActiveCell.Offset(-1, 0) + 1

ComboBox18.Value = ""
ComboBox12.Value = ""
TextBox9.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
ComboBox3.Value = ""
TextBox24.Value = ""
TextBox8.Value = ""
ComboBox9.Value = ""
ComboBox11.Value = ""
ComboBox15.Value = ""
ComboBox4.Value = ""
ComboBox14.Value = ""
ComboBox6.Value = ""
TextBox12.Value = ""
ComboBox10.Value = ""
TextBox20.Value = ""
TextBox18.Value = ""

TextBox26 = ""
ComboBox19.Value = ""

MsgBox "Satır güncelleştirmesi tamamlandı.!!"

End If


CommandButton70_Click
CommandButton83_Click
CommandButton71_Click

ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFiltering:=True
End Sub
 
Katılım
23 Temmuz 2007
Mesajlar
178
Excel Vers. ve Dili
2003 Türkçe
Konu hakkında aslında sayın cebirden yardım istemek daha doğru ama o yardımcı olmuştu. Sayın Cebir şuan konudan haberi olmayabilir, uzmanlarımızdan konu hakkında bir yol göstermelerini rica ediyorum.

Saygılarımla
 
Üst