mustafa1205
Altın Üye
- Katılım
- 23 Ekim 2010
- Mesajlar
- 1,437
- Excel Vers. ve Dili
- Office 2016 / 64 Bit - Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim sat1 As Long, sat2 As Long, ckbx As Object
sat1 = Cells(Rows.Count, "D").End(xlUp).Row + 1
For Each chbx In Me.Controls
If TypeName(chbx) = "CheckBox" Then
If chbx.Value = False Then Cells(sat1, "D").Value = CLng(chbx.Tag): sat1 = sat1 + 1
End If
Next
MsgBox "İşlem tamamlandı." & vbLf & "evrengizlen@hotmail.com", vbOKOnly + vbInformation
Unload Me
End Sub
Dosya üzerinde siz 3-5 tane yapın göreyim.Hocam harikasınız.Zaten bu kodlarıda siz hazırlamıştınız.Tam istediğim gibi olmuş. Birşey daha isteyebilirmiyim eğer vaktiniz olursa. Malum G hücresinden istenilenleri D hücresine kopyalama yaptık peki A,B,C hücrelerinde bulunan verileride D hücresine kopyalanan miktar kadar aynı anda alt alta kopyalama yapabilir miyiz acaba ?
Private Sub CommandButton1_Click()
Dim sat1 As Long, sat2 As Long, ckbx As Object
sat1 = Cells(Rows.Count, "D").End(xlUp).Row + 1
Range("A" & sat1 - 1 & ":C" & sat1 - 1).Copy
For Each chbx In Me.Controls
If TypeName(chbx) = "CheckBox" Then
If chbx.Value = False Then
Cells(sat1, "D").Value = CLng(chbx.Tag)
Range("A" & sat1).PasteSpecial
sat1 = sat1 + 1
oldu = True
End If
End If
Next
Application.CutCopyMode = False
MsgBox "İşlem tamamlandı." & vbLf & "evrengizlen@hotmail.com", vbOKOnly + vbInformation
Unload Me
End Sub
ekli dosyayı inceleyiniz.
Kod:Private Sub CommandButton1_Click() Dim sat1 As Long, sat2 As Long, ckbx As Object sat1 = Cells(Rows.Count, "D").End(xlUp).Row + 1 Range("A" & sat1 - 1 & ":C" & sat1 - 1).Copy For Each chbx In Me.Controls If TypeName(chbx) = "CheckBox" Then If chbx.Value = False Then Cells(sat1, "D").Value = CLng(chbx.Tag) Range("A" & sat1).PasteSpecial sat1 = sat1 + 1 oldu = True End If End If Next Application.CutCopyMode = False MsgBox "İşlem tamamlandı." & vbLf & "evrengizlen@hotmail.com", vbOKOnly + vbInformation Unload Me End Sub
Private Sub CommandButton1_Click()
Dim sat1 As Long, sat2 As Long, ckbx As Object
sat1 = Cells(Rows.Count, "D").End(xlUp).Row + 1
Range("A" & sat1 - 1 & ":C" & sat1 - 1).Copy
For Each chbx In Me.Controls
If TypeName(chbx) = "CheckBox" Then
If chbx.Value = False Then
Cells(sat1, "D").Value = Replace(chbx.Caption, " HARİÇ", "")
Range("A" & sat1).PasteSpecial
sat1 = sat1 + 1
oldu = True
End If
End If
Next
Application.CutCopyMode = False
MsgBox "İşlem tamamlandı." & vbLf & "evrengizlen@hotmail.com", vbOKOnly + vbInformation
Unload Me
End Sub
userforma istediğiniz kadar çek box ekleyebilirsiniz.Evren Hocam şimdi anladım siz verileri check box üzerinde yazan verileri yazdırıyorsunuz. Ben hücrelerden aldığınızı zannetmiştim. Şimdi oldu. Sadece şunu sormak istiyorum. Aynı User form üzerine ikinci plan yapıldığında mevcut kodlar aynımı kalacak ekleme yada çıkarma olacak mı ?