• DİKKAT

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

Veriyi değiştir bütonu

Katılım
24 Şubat 2009
Mesajlar
1,077
Excel Vers. ve Dili
2016
Merhaba arkadaşlar; ekli dosyamdaki Değiştir bütonu için siteden kod aldım ama çalışmıyor buna bir bakarmısınız. Teşekkürler
Private Sub CommandButton3_Click()
If Parola = Format(Now, "yyyy") Then
Onay = MsgBox("Yapılan değişiklikleri onaylıyor musunuz ?", vbCritical + vbYesNo + vbDefaultButton2)
If Onay = vbYes Then
Set Bul = Range("A:A").Find(TextBox1, LookAt:=xlWhole)
If Not Bul Is Nothing Then
Cells(Bul.Row, 1) = Val(TextBox1)
Cells(Bul.Row, 2) = TextBox2.Text
Cells(Bul.Row, 3) = TextBox3.Text
Cells(Bul.Row, 4) = TextBox4.Text
Cells(Bul.Row, 5) = TextBox5.Text
Cells(Bul.Row, 6) = TextBox6.Text
Cells(Bul.Row, 7) = TextBox7.Text
Cells(Bul.Row, 8) = TextBox8.Text
Cells(Bul.Row, 9) = TextBox9.Text
Cells(Bul.Row, 10) = TextBox10.Text
Cells(Bul.Row, 11) = TextBox11.Text
Cells(Bul.Row, 12) = TextBox12.Text
Cells(Bul.Row, 13) = TextBox13.Text
Cells(Bul.Row, 14) = TextBox14.Text
Cells(Bul.Row, 15) = TextBox15.Text
Cells(Bul.Row, 16) = TextBox16.Text
Cells(Bul.Row, 17) = TextBox17.Text
Range("B2:Q65536").Sort Key1:=Range("B2")
End If
End Sub
 

Ekli dosyalar

Merhaba arkadaşlar; ekli dosyamdaki Değiştir bütonu için siteden kod aldım ama çalışmıyor buna bir bakarmısınız. Teşekkürler
Private Sub CommandButton3_Click()
If Parola = Format(Now, "yyyy") Then
Onay = MsgBox("Yapılan değişiklikleri onaylıyor musunuz ?", vbCritical + vbYesNo + vbDefaultButton2)
If Onay = vbYes Then
Set Bul = Range("A:A").Find(TextBox1, LookAt:=xlWhole)
If Not Bul Is Nothing Then
Cells(Bul.Row, 1) = Val(TextBox1)
Cells(Bul.Row, 2) = TextBox2.Text
Cells(Bul.Row, 3) = TextBox3.Text
Cells(Bul.Row, 4) = TextBox4.Text
Cells(Bul.Row, 5) = TextBox5.Text
Cells(Bul.Row, 6) = TextBox6.Text
Cells(Bul.Row, 7) = TextBox7.Text
Cells(Bul.Row, 8) = TextBox8.Text
Cells(Bul.Row, 9) = TextBox9.Text
Cells(Bul.Row, 10) = TextBox10.Text
Cells(Bul.Row, 11) = TextBox11.Text
Cells(Bul.Row, 12) = TextBox12.Text
Cells(Bul.Row, 13) = TextBox13.Text
Cells(Bul.Row, 14) = TextBox14.Text
Cells(Bul.Row, 15) = TextBox15.Text
Cells(Bul.Row, 16) = TextBox16.Text
Cells(Bul.Row, 17) = TextBox17.Text
Range("B2:Q65536").Sort Key1:=Range("B2")
End If
End Sub

Merhaba
Aşağıdaki gibi deneyin, parola isteyen üstteki kırmızı bölümün başına tırnak kondu eğer parola sorsun derseniz tırnakları kaldırın.
Alttaki kırmızı bölümle "T.C." yi değilde isimleri sıralaması içinde onun yerine;
Kod:
 Range("B2:Q65536").Sort Key1:=Range("C2")

Kod:
 Private Sub CommandButton3_Click()
[COLOR="Red"]'parola = InputBox("parola giriniz")
'If parola <> Format(Now, "yyyy") Then exit sub[/COLOR]
                 Onay = MsgBox("Yapılan değişiklikleri onaylıyor musunuz ?", vbCritical + vbYesNo + vbDefaultButton2)
                 If Onay = vbYes Then
                  Set Bul = Range("B2:B65000").Find(TextBox1, LookAt:=xlWhole)
                 If Not Bul Is Nothing Then
                    Cells(Bul.Row, 2) = Val(TextBox1)
                    Cells(Bul.Row, 3) = TextBox2.Text
                    Cells(Bul.Row, 4) = TextBox3.Text
                    Cells(Bul.Row, 5) = TextBox4.Text
                    Cells(Bul.Row, 6) = TextBox5.Text
                    Cells(Bul.Row, 7) = Format(TextBox6.Text, "dd.mm.yyyy")
                    Cells(Bul.Row, 8) = TextBox7.Text
                    Cells(Bul.Row, 9) = TextBox8.Text
                    Cells(Bul.Row, 10) = TextBox9.Text
                    Cells(Bul.Row, 11) = TextBox10.Text
                    Cells(Bul.Row, 12) = TextBox11.Text
                    Cells(Bul.Row, 13) = TextBox12.Text
                    Cells(Bul.Row, 14) = TextBox13.Text
                    Cells(Bul.Row, 15) = TextBox14.Text
                    Cells(Bul.Row, 16) = TextBox15.Text
                    Cells(Bul.Row, 17) = TextBox17.Text
                   [COLOR="Red"] Range("B2:Q65536").Sort Key1:=Range("B2")[/COLOR]
                End If: End If
End Sub
 
Son düzenleme:
selam arkadaşın çalışman güzel banada böyle birşey lazım ancak
resim alanında resimleri göstermek için ne yapmam lazım resim görünmüyor..
 
Geri
Üst