• DİKKAT

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

Vba 1 Ay önceki veriler değiştirilmesin

  • Konbuyu başlatan Konbuyu başlatan TUGBADM
  • Başlangıç tarihi Başlangıç tarihi
  • Etiketler Etiketler
    vba
Katılım
3 Ekim 2022
Mesajlar
37
Excel Vers. ve Dili
EXCEL VBA
Merhaba Arkadaşlar,

Vba Form ile oluşturduğum ürün kayıtlarının güncelle kısmında listbox tan güncellenecek ürünü seçip textboxlara verileri aktartıp değiştirme (güncelleştirme) yaptırıyorum. Tarih olarak bugünden itibaren 1 ay önceki (2 ay ya da 3 ay gibi) kayıtlar değiştirilmesin şeklinde nasıl yapabilirim. Dosyam Ektedir. Yardımcı olur musunuz?

Teşekkürler.
 

Ekli dosyalar

Merhaba,

Öncelikle formun açılışında ListBox nesnesine veri yükleyen satırı aşağıdaki gibi revize ediniz.

ListBox_Guncelle.RowSource = "A2:N" & Cells(Rows.Count, 2).End(3).Row


ListBox Change olayını da aşağıdaki gibi revize edip deneyiniz.

C++:
Private Sub ListBox_Guncelle_Click()
    ComboBox_HammaddeAdiGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 1)
    ComboBox_MarkaGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 2)
    ComboBox_OzellikGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 3)
    TextBox_TarihGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 4)
    ComboBox_VardiyaGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 5)
    ComboBox_RenkGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 6)
    ComboBox_VerimlilikGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 7)
    ComboBox_VoltajGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 8)
    TextBox_PaletSayisiGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 9)
    TextBox_KoliSayisiGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 10)
    TextBox_KutuSayisiGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 11)
    ComboBox_BirimGuncelle.Text = Me.ListBox_Guncelle.List(ListBox_Guncelle.ListIndex, 13)
    CmdButton_Guncelle.Visible = False
    If Date - CDate(TextBox_TarihGuncelle) <= 30 Then
        CmdButton_Guncelle.Visible = True
    End If
End Sub
 
Geri
Üst