Excel Vba Formdaki Bilgilerde Değişiklik Yapıldıysa Güncellesin.

1 2 3
19/04/2021, 21:57

feraz

Doğru yada yanlış olayı ile güncelleme kodu alakasızdı bildiğim.Normalde IIF mantığıda doğru birazdan bakarım yinede
19/04/2021, 22:07

feraz

Alttaki gibi yapınca evet yada hayır olrarak güncelledi güncelleme butonunda.

.Cells(Guncelle, 19) = IIf(CheckBox_FotoselliKapi.Value = True, "Evet", "Hayýr")
19/04/2021, 22:20

feraz

Güncelleme butonunu ayarladım.İff yerine alttaki gibi sub yaptım.
Call checkboxxGuncelle(Guncelle, 16, CheckBox_BioClimatic) '16 demek 
yukardaki gibide devam edin abey diğerlerine.Normalde iff çalışıyor hangisini isterseniz onu kullanın.


PHP Kod:
Sub checkboxxGuncelle(deger As Longsutun As Bytechecboxad As MSForms.CheckBox)
    With ThisWorkbook.Worksheets("Ana_Sayfa")
        If checboxad.Value True Then
            
.Cells(degersutun) = "Evet"
        ElseIf checboxad.Value False Then
            
.Cells(degersutun) = "Hayýr"
        End If
    End With
End Sub 
19/04/2021, 22:42

Oğuz Türkyılmaz

Feraz hocam IIF şeklinde olan kodu anlamam daha kolay. Bu yüzden onu kullanmıştım zaten sorunsuz çalışıyor. Bir sorun olmaz ise onu kullanayım.
19/04/2021, 23:01

feraz

Sorun çıkartmaz abey.
19/04/2021, 23:48

feraz

Kodları biraz inceleyince alttakileri silip sadece  checkboxKontrol Guncelle yazmanız yeterli aslında.
Çünkü checkboxKontrol  adında sub var.



Kod:
        .Cells(Guncelle, 16) = CheckBox_BioClimatic.Value
        .Cells(Guncelle, 17) = CheckBox_CamBalkon.Value
        .Cells(Guncelle, 18) = CheckBox_CamTavan.Value
        .Cells(Guncelle, 19) = CheckBox_FotoselliKapi.Value
        .Cells(Guncelle, 20) = CheckBox_Giyotin.Value
        .Cells(Guncelle, 21) = CheckBox_IsicamliSurme.Value
        .Cells(Guncelle, 22) = CheckBox_Pergola.Value
        .Cells(Guncelle, 23) = CheckBox_RuzgarKirici.Value
        .Cells(Guncelle, 24) = CheckBox_TavanPerdesi.Value
        .Cells(Guncelle, 25) = CheckBox_ZipPerde.Value

Aynışekilde btn_KayitEkle_Click kodundaki en alttaki kodları silip 
Kod:
checkboxKontrol SonSatir
yazmanız yeterli

        .Cells(SonSatir, 16) = CheckBox_BioClimatic.Value
        .Cells(SonSatir, 17) = CheckBox_CamBalkon.Value
        .Cells(SonSatir, 18) = CheckBox_CamTavan.Value
        .Cells(SonSatir, 19) = CheckBox_FotoselliKapi.Value
        .Cells(SonSatir, 20) = CheckBox_Giyotin.Value
        .Cells(SonSatir, 21) = CheckBox_İsicamliSurme.Value
        .Cells(SonSatir, 22) = CheckBox_Pergola.Value
        .Cells(SonSatir, 23) = CheckBox_RuzgarKirici.Value
        .Cells(SonSatir, 24) = CheckBox_TavanPerdesi.Value
        .Cells(SonSatir, 25) = CheckBox_ZipPerde.Value
1 2 3