- Katılım
- 4 Mayıs 2007
- Mesajlar
- 3,677
- Excel Vers. ve Dili
- 2016 PRO TÜRKÇE-İNG. 64 BİT
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Userform yok.userform'u başlangıçta nasıl aktif yapabilirm
Sayfa aktif olduğunda kod çalışır.mükerrer kayıtları süzmesi için makrosunu yazdım ama açılışta çalışmıyor
Private Sub Worksheet_Activate()
For x = 2 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("a2:a" & x), Cells(x, 1)) = 1 Then
ComboBox1.AddItem Cells(x, 1).Value
End If
Next
End Sub
Userform yok.
Sayfa aktif olduğunda kod çalışır.
Kod:Private Sub Worksheet_Activate() For x = 2 To Cells(65536, 1).End(xlUp).Row If WorksheetFunction.CountIf(Range("a2:a" & x), Cells(x, 1)) = 1 Then ComboBox1.AddItem Cells(x, 1).Value End If Next End Sub
Private Sub Worksheet_Activate()
For x = 2 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("a2:a" & x), Cells(x, 1)) = 1 Then
ComboBox1.AddItem Cells(x, 1).Value
End If
Next
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 7 To [z1].End(xlToLeft).Column
If Cells(1, i) = "" Then
ActiveSheet.ChartObjects("2 Grafik").Activate
ActiveChart.SetSourceData Source:=Range(Cells(1, 6), Cells(3, i - 1)): Exit Sub
End If
Next
End Sub
Combobox nesnesini nasıl kullanmak istediğinizi anlamadım.
Private Sub Workbook_Open()
For x = 2 To Sayfa1.Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("a2:a" & x), Sayfa1.Cells(x, 1)) = 1 Then
Sayfa1.ComboBox1.AddItem Sayfa1.Cells(x, 1).Value
End If
Next
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
sat = [z1].End(xlToLeft).Column
For i = 7 To [z1].End(xlToLeft).Column
If Cells(1, i) = "" Then
ActiveSheet.ChartObjects("2 Grafik").Activate
ActiveChart.SetSourceData Source:=Range(Cells(1, 6), Cells(3, i - 1)): Exit Sub
Else
ActiveSheet.ChartObjects("2 Grafik").Activate
ActiveChart.SetSourceData Source:=Range(Cells(1, 6), Cells(3, sat))
End If
Next
End Sub