Consulting

Results 1 to 3 of 3

Thread: Listbox.Column

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Dec 2009
    Posts
    22
    Location

    Listbox.Column

    Hi, I have this piece of code, then I had to move the "kosten_tbl" on the "sheet Basisgegevens"
    First, the kosten_tbl was starting at A2 having 15 rows
    Now I moved the kosten_tbl to the S column now I can't add items to the kosten_tbl (S1:S16) (and growing when needed)
    Can someone help me out?
    Thnx!
    Private Sub Cmd_Toevoegen_Click()If Len(Trim(T_edit)) = 0 Then
              MsgBox T_edit.Tag & " is niet ingevuld!", vbCritical, "Fout!"
              T_edit.SetFocus
              Exit Sub
            End If
    Set ws = Worksheets("Basisgegevens")
    For i = 0 To LB_overzicht.ListCount - 1
    If LB_overzicht.Column(0, i) = T_edit.Value Then
        MsgBox "Deze kostenpost is reeds ingegeven.", vbCritical, "Fout"
        Exit Sub
    End If
    Next i
    iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
        ws.Cells(iRow, 1).Value = T_edit.Value
    T_edit.Value = ""
    LB_overzicht.List = [kosten_tbl].Value
    End Sub
    Last edited by HV_L; 06-20-2019 at 06:30 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •