- Katılım
- 17 Mart 2006
- Mesajlar
- 100
- Excel Vers. ve Dili
-
excel 2007
türkçe
- Altın Üyelik Bitiş Tarihi
- 24.01.2019
merhaba arkadaşlar.
userform üzerine yerleştirdiğim spinbutton ile aşağıdaki kodlarla listemdeki bilgileri userform uzerindeki textboxlara çağırıp görüntüleyebiliyorum.
fakat geri işlemi yapılırken ilk satıra geldikten sonra tekrar tıklanırsa hata veriyor.bunu engellemenin bir yolu varmı? yada sadece dolu olan satır içinde gezinti yapıp boş olan satıra yada ilk satırdan sonraki tıklamada hata mesajı yerine uygun veri bulunamadı mesajı almak için koda ne gibi bir ilave yapmam gerekiyor?
yardımlarınız için şimdiden teşekkürler...
Private Sub SpinButton1_SpinDown()
Sheets("Data").Select
Cells(ActiveCell.Row - 1, 2).Select
TextBox1.Value = ActiveCell.Value
TextBox2.Value = ActiveCell.Offset(0, 1).Value
TextBox3.Value = ActiveCell.Offset(0, 2).Value
TextBox4.Value = ActiveCell.Offset(0, 3).Value
TextBox5.Value = ActiveCell.Offset(0, 4).Value
TextBox6.Value = ActiveCell.Offset(0, 5).Value
TextBox7.Value = ActiveCell.Offset(0, 6).Value
TextBox8.Value = ActiveCell.Offset(0, 7).Value
TextBox9.Value = ActiveCell.Offset(0, 8).Value
TextBox12.Value = ActiveCell.Offset(0, 9).Value
TextBox13.Value = ActiveCell.Offset(0, 10).Value
Image3.Picture = LoadPicture(TextBox12.Text)
End Sub
Private Sub SpinButton1_SpinUp()
Sheets("Data").Select
Cells(ActiveCell.Row + 1, 2).Select
TextBox1.Value = ActiveCell.Value
TextBox2.Value = ActiveCell.Offset(0, 1).Value
TextBox3.Value = ActiveCell.Offset(0, 2).Value
TextBox4.Value = ActiveCell.Offset(0, 3).Value
TextBox5.Value = ActiveCell.Offset(0, 4).Value
TextBox6.Value = ActiveCell.Offset(0, 5).Value
TextBox7.Value = ActiveCell.Offset(0, 6).Value
TextBox8.Value = ActiveCell.Offset(0, 7).Value
TextBox9.Value = ActiveCell.Offset(0, 8).Value
TextBox12.Value = ActiveCell.Offset(0, 9).Value
TextBox13.Value = ActiveCell.Offset(0, 10).Value
Image3.Picture = LoadPicture(TextBox12.Text)
End Sub
userform üzerine yerleştirdiğim spinbutton ile aşağıdaki kodlarla listemdeki bilgileri userform uzerindeki textboxlara çağırıp görüntüleyebiliyorum.
fakat geri işlemi yapılırken ilk satıra geldikten sonra tekrar tıklanırsa hata veriyor.bunu engellemenin bir yolu varmı? yada sadece dolu olan satır içinde gezinti yapıp boş olan satıra yada ilk satırdan sonraki tıklamada hata mesajı yerine uygun veri bulunamadı mesajı almak için koda ne gibi bir ilave yapmam gerekiyor?
yardımlarınız için şimdiden teşekkürler...
Private Sub SpinButton1_SpinDown()
Sheets("Data").Select
Cells(ActiveCell.Row - 1, 2).Select
TextBox1.Value = ActiveCell.Value
TextBox2.Value = ActiveCell.Offset(0, 1).Value
TextBox3.Value = ActiveCell.Offset(0, 2).Value
TextBox4.Value = ActiveCell.Offset(0, 3).Value
TextBox5.Value = ActiveCell.Offset(0, 4).Value
TextBox6.Value = ActiveCell.Offset(0, 5).Value
TextBox7.Value = ActiveCell.Offset(0, 6).Value
TextBox8.Value = ActiveCell.Offset(0, 7).Value
TextBox9.Value = ActiveCell.Offset(0, 8).Value
TextBox12.Value = ActiveCell.Offset(0, 9).Value
TextBox13.Value = ActiveCell.Offset(0, 10).Value
Image3.Picture = LoadPicture(TextBox12.Text)
End Sub
Private Sub SpinButton1_SpinUp()
Sheets("Data").Select
Cells(ActiveCell.Row + 1, 2).Select
TextBox1.Value = ActiveCell.Value
TextBox2.Value = ActiveCell.Offset(0, 1).Value
TextBox3.Value = ActiveCell.Offset(0, 2).Value
TextBox4.Value = ActiveCell.Offset(0, 3).Value
TextBox5.Value = ActiveCell.Offset(0, 4).Value
TextBox6.Value = ActiveCell.Offset(0, 5).Value
TextBox7.Value = ActiveCell.Offset(0, 6).Value
TextBox8.Value = ActiveCell.Offset(0, 7).Value
TextBox9.Value = ActiveCell.Offset(0, 8).Value
TextBox12.Value = ActiveCell.Offset(0, 9).Value
TextBox13.Value = ActiveCell.Offset(0, 10).Value
Image3.Picture = LoadPicture(TextBox12.Text)
End Sub