+ Reply to Thread
Results 1 to 3 of 3

Userform to show filtered data

Hybrid View

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    Middle east
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Userform to show filtered data

    OK... So I have made some progress...

    Now I have a working scrollbar on the form that loops through the lines (and the form shows the data of the relevant line). Here is the code I am using:
    Private Sub ScrollBar1_Change()
    Lrow = Range("a10000").End(xlUp).Offset(1, 0).Row
    ScrollBar1.Min = "2"
    ScrollBar1.Max = Lrow
    TextBox1.Value = ScrollBar1.Value 'Shows the current line number
    SB_row = ScrollBar1.Value
    Me.txt_AAA.Value = Cells(SB_row, 1).Value
    Me.txt_BBB.Value = Cells(SB_row, 3).Value
    Me.txt_CCC.Value = Cells(SB_row, 4).Value
    Me.txt_DDD.Value = Cells(SB_row, 5).Value
    Me.txt_EEE.Value = Cells(SB_row, 6).Value
    Me.txt_FFF.Value = Cells(SB_row, 7).Value
    Me.txt_GGG.Value = Cells(SB_row, 8).Value
    Me.txt_HHH.Value = Cells(SB_row, 9).Value
    End Sub
    What I still need is the code to apply autofilter to the database (based on a value that the user selects from a ComboBox) and then - I need the scrollbar to loop through the visible lines only, because my data is pulled to the form based on the scrollbar value, so if the scrollbar will loop though visible lines only - the form will only show the visible data as well.

    BTW, I will be very happy even with a solution that assumes the database is already filtered (from within the sheet, and not from the ComboBox on in the form...) and tells the ScrollBar to loop only through the visible cells.

    Hope all this is clear, even though I have not provided an example.

    :-)
    Last edited by onsid; 02-23-2013 at 04:23 AM.

+ Reply to Thread

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