Results 1 to 4 of 4

Show Search results in userform

Threaded View

  1. #1
    Registered User
    Join Date
    02-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    30

    Show Search results in userform

    Hi, I am using the file NameNo Data (2).xls‎ and it is working for my needs, but for the liofe of me I can't figure out why it will only return 6 column worth of row data. I have tried to make what I thought were the right change by adding additional entries as listed her but it stops at 6 column still. any ideeas

    With Me.ListBox1
                        .AddItem c.Value
                        .List(.ListCount - 1, 0) = c.Offset(0, x).Address    'record number
                        .List(.ListCount - 1, 1) = c.Offset(0, x).Value  'surname
                        .List(.ListCount - 1, 2) = c.Offset(0, (x + 1)).Value  'first name
                        .List(.ListCount - 1, 3) = c.Offset(0, (x + 2)).Value    'DOB
                        .List(.ListCount - 1, 4) = c.Offset(0, (x + 3)).Value    'address
                        .List(.ListCount - 1, 5) = c.Offset(0, (x + 4)).Value    'date spoken to
                        .List(.ListCount - 1, 6) = c.Offset(0, (x + 5)).Value    'notes
                        .List(.ListCount - 1, 7) = c.Offset(0, (x + 6)).Value
                        .List(.ListCount - 1, 8) = c.Offset(0, (x + 7)).Value
                        .List(.ListCount - 1, 9) = c.Offset(0, (x + 8)).Value
                        '.List(.ListCount - 1, 10) = c.Offset(0, (x + 9)).Value
                        '.List(.ListCount - 1, 11) = c.Offset(0, (x + 10)).Value
                        '.List(.ListCount - 1, 12) = c.Offset(0, (x + 11)).Value
                        '.List(.ListCount - 1, 13) = c.Offset(0, (x + 12)).Value
                        '.List(.ListCount - 1, 14) = c.Offset(0, (x + 13)).Value
                        '.List(.ListCount - 1, 15) = c.Offset(0, (x + 14)).Value
                        '.List(.ListCount - 1, 16) = c.Offset(0, (x + 15)).Value
                        '.List(.ListCount - 1, 17) = c.Offset(0, (x + 16)).Value
                        '.List(.ListCount - 1, 18) = c.Offset(0, (x + 17)).Value
                        '.List(.ListCount - 1, 19) = c.Offset(0, (x + 18)).Value
                        '.List(.ListCount - 1, 20) = c.Offset(0, (x + 19)).Value
                        '.List(.ListCount - 1, 21) = c.Offset(0, (x + 20)).Value
    
                    End With
    Moderator's Edit: Use code tags when posting code. To do so in future, select your code and click on the # icon at the top of your post window.


    Sorry, I forgot my code tag
    Last edited by StartingOut; 12-20-2012 at 08:59 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1