Thema Datum  Von Nutzer Rating
Antwort
21.08.2023 08:59:49 Daniel
NotSolved
21.08.2023 09:25:21 Flatulenz
NotSolved
21.08.2023 11:12:43 Gast21033
NotSolved
21.08.2023 11:44:16 Flatulenz
NotSolved
Rot Listbox ohne Nachkommastellen
21.08.2023 12:11:06 Gast19061
NotSolved
21.08.2023 12:22:25 Flatulenz
NotSolved
21.08.2023 13:08:50 Gast51383
NotSolved
21.08.2023 13:19:57 Flatulenz
NotSolved
21.08.2023 13:39:00 Gast42632
NotSolved
21.08.2023 13:45:55 Flatulenz
NotSolved
21.08.2023 14:02:25 Gast84991
NotSolved
22.08.2023 14:35:09 Gast6854
NotSolved

Ansicht des Beitrags:
Von:
Gast19061
Datum:
21.08.2023 12:11:06
Views:
187
Rating: Antwort:
  Ja
Thema:
Listbox ohne Nachkommastellen

 

Private Sub UserForm_Initialize()
Dim Zeile As Long
'Schleife über alle Zeilen der Tabelle
For Zeile = 1 To Tabelle3.Cells(Rows.Count, 2).End(xlUp).Row
    
    Me.ListBox1.AddItem Tabelle3.Cells(Zeile, 1)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = Tabelle3.Cells(Zeile, 2)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = Tabelle3.Cells(Zeile, 3)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = Tabelle3.Cells(Zeile, 4)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 4) = Tabelle3.Cells(Zeile, 5)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 5) = Tabelle3.Cells(Zeile, 6)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 6) = CInt(Tabelle3.Cells(Zeile, 7))
    
    
    
    
      
Next Zeile
'Erstes Element als Default auswählen
Me.ListBox1.Selected(0) = True
End Sub

Private Sub TextBox1_Change()
Dim Zeile As Long
Me.ListBox1.Clear
'Schleife über alle Zeilen der Tabelle
For Zeile = 1 To Tabelle3.Cells(Rows.Count, 2).End(xlUp).Row
    
    If InStr(1, LCase(Tabelle3.Cells(Zeile, 1).Value), LCase(Me.TextBox1.Value)) <> 0 Or _
       InStr(1, LCase(Tabelle3.Cells(Zeile, 2).Value), LCase(Me.TextBox1.Value)) <> 0 Or _
       InStr(1, LCase(Tabelle3.Cells(Zeile, 3).Value), LCase(Me.TextBox1.Value)) <> 0 Or _
       InStr(1, LCase(Tabelle3.Cells(Zeile, 4).Value), LCase(Me.TextBox1.Value)) <> 0 Or _
       InStr(1, LCase(Tabelle3.Cells(Zeile, 5).Value), LCase(Me.TextBox1.Value)) <> 0 Or _
       InStr(1, LCase(Tabelle3.Cells(Zeile, 6).Value), LCase(Me.TextBox1.Value)) <> 0 Then
       
       
    Me.ListBox1.AddItem Tabelle3.Cells(Zeile, 1)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = Tabelle3.Cells(Zeile, 2)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 2) = Tabelle3.Cells(Zeile, 3)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 3) = Tabelle3.Cells(Zeile, 4)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 4) = Tabelle3.Cells(Zeile, 5)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 5) = Tabelle3.Cells(Zeile, 6)
    Me.ListBox1.List(Me.ListBox1.ListCount - 1, 6) = CInt(Tabelle3.Cells(Zeile, 7))
        
        
    End If
    
Next Zeile

End Sub

 

 

?


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
21.08.2023 08:59:49 Daniel
NotSolved
21.08.2023 09:25:21 Flatulenz
NotSolved
21.08.2023 11:12:43 Gast21033
NotSolved
21.08.2023 11:44:16 Flatulenz
NotSolved
Rot Listbox ohne Nachkommastellen
21.08.2023 12:11:06 Gast19061
NotSolved
21.08.2023 12:22:25 Flatulenz
NotSolved
21.08.2023 13:08:50 Gast51383
NotSolved
21.08.2023 13:19:57 Flatulenz
NotSolved
21.08.2023 13:39:00 Gast42632
NotSolved
21.08.2023 13:45:55 Flatulenz
NotSolved
21.08.2023 14:02:25 Gast84991
NotSolved
22.08.2023 14:35:09 Gast6854
NotSolved