• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

çalışma sayfası içinde istediğim sayfaya kayıt nasıl yaparım

Katılım
19 Şubat 2011
Mesajlar
177
Excel Vers. ve Dili
excel 2010 tr
AKTİF SAYFAYA DEĞİLDE SAYFA 2 YE KAYIT YAPMAK İSTESEM . NASIL KOD YAZMALIYIM.
KOD:
Private Sub CommandButton1_Click()
If TextBox1 = "" Then 'Textbox1 boş ise
MsgBox "Lütfen İstif No'yu girin" 'Mesaj ver
Exit Sub 'Besajdan sonra başka komut çalıştırmadan çık
ElseIf TextBox2 = "" Then 'Textbox2 boş ise
MsgBox "Lütfen Steri girin" 'Mesaj ver
Exit Sub 'Mesajdan sonra çık
End If 'If sorgusunun sonu
'Eğer textboxlar boş değilse üstteki satırlar çalışmadan alt satıra geçilir.
[A65536].End(xlUp).Offset(1, 0).Select 'A sütununda ilk boş satıra zıpla
ActiveCell = TextBox1 'Zıplanılan boş satırın değeri = textbox1
ActiveCell.Offset(0, 1) = TextBox2 'Bir sağındaki satırın değeri = textbox2

If OptionButton1 = True Then ActiveCell.Offset(0, 2) = "X"
'Bir sağındaki satırın değeri, ödendi seçildi ise-
If OptionButton2 = True Then ActiveCell.Offset(0, 3) = "X" 'ödendi, ödenmedi seçildi ise ödenmedi olsun

If OptionButton3 = True Then ActiveCell.Offset(0, 4) = "X" 'Bir sağındaki satırın değeri, gitti seçildi ise-

If OptionButton4 = True Then ActiveCell.Offset(0, 5) = "X" 'gitti, gitmedi seçildi ise gitmedi olsun

If OptionButton5 = True Then ActiveCell.Offset(0, 6) = "X"

If OptionButton6 = True Then ActiveCell.Offset(0, 7) = "X"

If OptionButton7 = True Then ActiveCell.Offset(0, 8) = "X"

If OptionButton8 = True Then ActiveCell.Offset(0, 9) = "X"

If OptionButton9 = True Then ActiveCell.Offset(0, 10) = "X"

If OptionButton10 = True Then ActiveCell.Offset(0, 11) = "X"

If OptionButton11 = True Then ActiveCell.Offset(0, 12) = "X"

If OptionButton12 = True Then ActiveCell.Offset(0, 13) = "X"

If OptionButton13 = True Then ActiveCell.Offset(0, 14) = "X"

If OptionButton14 = True Then ActiveCell.Offset(0, 15) = "X"

If OptionButton15 = True Then ActiveCell.Offset(0, 16) = "X"

If OptionButton16 = True Then ActiveCell.Offset(0, 17) = "X"

If OptionButton17 = True Then ActiveCell.Offset(0, 18) = "X"

If OptionButton18 = True Then ActiveCell.Offset(0, 19) = "X"

If OptionButton19 = True Then ActiveCell.Offset(0, 20) = "X"

If OptionButton20 = True Then ActiveCell.Offset(0, 21) = "X"

If OptionButton21 = True Then ActiveCell.Offset(0, 22) = "X"

If OptionButton22 = True Then ActiveCell.Offset(0, 23) = "X"

If OptionButton23 = True Then ActiveCell.Offset(0, 24) = "X"

If OptionButton24 = True Then ActiveCell.Offset(0, 25) = "X"

If OptionButton25 = True Then ActiveCell.Offset(0, 27) = "X"

If OptionButton26 = True Then ActiveCell.Offset(0, 29) = "X"

If OptionButton27 = True Then ActiveCell.Offset(0, 30) = "X"

If OptionButton28 = True Then ActiveCell.Offset(0, 31) = "X"

If OptionButton29 = True Then ActiveCell.Offset(0, 32) = "X"

If OptionButton30 = True Then ActiveCell.Offset(0, 33) = "X"

If OptionButton31 = True Then ActiveCell.Offset(0, 34) = "X"

If OptionButton32 = True Then ActiveCell.Offset(0, 36) = "X"

If OptionButton33 = True Then ActiveCell.Offset(0, 38) = "X"

If OptionButton34 = True Then
ActiveCell.Offset(0, 27) = "X"
ActiveCell.Offset(0, 10) = "X"
ActiveCell.Offset(0, 11) = "X"
End If
If OptionButton35 = True Then
ActiveCell.Offset(0, 13) = "X"
ActiveCell.Offset(0, 14) = "X"
ActiveCell.Offset(0, 20) = "X"
ActiveCell.Offset(0, 24) = "X"
End If

If OptionButton36 = True Then
ActiveCell.Offset(0, 31) = "X"
ActiveCell.Offset(0, 32) = "X"
ActiveCell.Offset(0, 33) = "X"
End If
MsgBox "İşlem kaydedildi." 'Veriler aktırıldıktan sonra mesaj ver

TextBox1 = "": TextBox2 = "" 'Textbox1, 2, option1, 2, 3 ve 4 'ü boşalt.
OptionButton1 = False: OptionButton2 = False
OptionButton3 = False: OptionButton4 = False

TextBox1.SetFocus 'İmleci textbox1'e gönder.
End Sub
 
Merhaba,

Kod:
[A65536].End(xlUp).Offset(1, 0).Select

Satırından önce

Kod:
Sheets("Sayfa2").select

satırınızı eklerseniz başka bir düzenlemeye gerek kalmaz.
 
yanlış oldu sorum burda
 
Son düzenleme:
Geri
Üst