• DİKKAT

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

ComboBox'da Satırı Gizlemek

Katılım
8 Mart 2007
Mesajlar
582
Excel Vers. ve Dili
excel 2000 Türkçe
Merhaba Arkadaşlar.

ComboBox3 de son dolu hücre görünmesin istemiyorum.

Bunun için aşağıdaki Kod da nasıl bir değişiklik yapmam gerekiyor.

Kod:
Private Sub UserForm_Initialize()

If LCase(ActiveSheet.Name) = "sayfa1" Or LCase(ActiveSheet.Name) = "liste" Or LCase(ActiveSheet.Name) = "şablon" Then
    ListBox1.Clear
    Exit Sub
End If
If WorksheetFunction.CountA(Range("A7:A" & Rows.Count)) = 0 Then GoTo var
alttoplamAl
var:



  'ComboBox3.MatchEntry = fmMatchEntryComplete
  Dim dic As Object
  Set dic = CreateObject("Scripting.Dictionary")

    For i = 7 To [D65536].End(3).Row
          dic(CStr(Cells(i, 4))) = dic(CStr(Cells(i, 4)))
    Next
ComboBox3.Clear

If dic.Count > 0 Then
    For Each Key In dic.keys
    ComboBox3.AddItem Key
  
    Next
    Call bubble_sort(Me.ComboBox3)
End If
Set dic = Nothing

'TextBox1.Text = CDate(Date) 'Form Açyly?ta otomatik tarih
ListBox1.ColumnCount = 13
ListBox1.ColumnWidths = "20;55;60;110;61;61;64;64;64;64;64;64;64"
ListBox1.ColumnHeads = True
'ListBox1.RowSource = "A7:L" & [A65536].End(3).Row + 1
ListBox1.RowSource = "A7:L" & [D65536].End(3).Row + 1
TextBox29.ControlSource = "A1" 'Form açıldığında TextBox güncelleniyor.

ComboBox1.RowSource = "Liste!l1:l2"
On Error Resume Next
TextBox21.Text = [e2]
TextBox22.Text = [e4]
TextBox23.Text = [e5]
TextBox60.Text = [C4]
TextBox61.Text = [C5]
TextBox29.Text = [a1]
TextBox24.Text = [G1]
TextBox25.Text = [G2]
TextBox27.Text = [G3]
TextBox63.Text = [G5]
TextBox62.Text = [I1]
TextBox64.Text = [I5]
TextBox65.Text = [K4]
TextBox95.Text = [H4]
TextBox82.Text = [I2]

'ComboBox1_Change
TextBox21 = Format(TextBox21, "#,##0.00")
TextBox22 = Format(TextBox22, "#,##0.00")
TextBox23 = Format(TextBox23, "#,##0.00")
TextBox60 = Format(TextBox60, "#,##0.00")
TextBox61 = Format(TextBox61, "#,##0.00")
TextBox24 = Format(TextBox24, "#,##0.00")
TextBox25 = Format(TextBox25, "#,##0.00")
TextBox27 = Format(TextBox27, "#,##0.00")
TextBox63 = Format(TextBox63, "#,##0.00")
TextBox62 = Format(TextBox62, "#,##0.00")
TextBox64 = Format(TextBox64, "#,##0.00")
TextBox65 = Format(TextBox65, "#,##0.00")
TextBox95 = Format(TextBox95, "#,##0.00")
TextBox82 = Format(TextBox82, "#,##0.00")
If LCase(ActiveSheet.Name) = "sayfa1" Or LCase(ActiveSheet.Name) = "liste" Or LCase(ActiveSheet.Name) = "?ABLON" Then
    ListBox1.Clear
    Exit Sub
End If
End Sub
 
Merhaba.

Sanırım ComboBox3 ten bahsediyorsunuz

Aşağıdaki satırın sonuna -1 yazın

Kod:
For i = 7 To [D65536].End(3).Row
Aşağıdaki gibi olacak
Kod:
For i = 7 To [D65536].End(3).Row - 1
 
Çok teşekkürler Hocam ellerinize sağlık.
 
Geri
Üst