Results 1 to 14 of 14
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    select from item and show data filtred... (2000 sr-1)

    In effect i want to scroll into userform the value from columns of the shseet(all tbox are identified with col_x where x is the letter of column), but:
    1) Insert only unique value in combobox1 from column D ( naturally without blank cells)
    2) if i select from cbox1 a value for example EXUV, permit the scroll (with scrollbar1) of value in variuos tboxes only if line is identified with EXUV...

    here the file:
    http://www.mytempdir.com/1094187

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select from item and show data filtred... (2000 sr-1)

    I cannot download the file (when I follow your link, I get an empty screen). Please reduce it in size so that you can attach the zip file to a post.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select from item and show data filtred... (200

    Sorry me, Hans...

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select from item and show data filtred... (200

    I don't understand your userform. There are two text boxes labeled Col_A and two labeled Col_G. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    And there is no code yet. <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select from item and show data filtred... (200

    Reformed userform....
    insert code....

    error in:Set CEL = ODIC(ScrollBar1.Value)

    when click on scrolbar1

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select from item and show data filtred... (200

    That is because ODIC hasn't been filled yet when the form is opened. Insert the following line

    ComboBox1.ListIndex = 0

    in the UserForm_Iniitialize event procedure, immediately above the line

    End Sub

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select from item and show data filtred... (200

    tks...
    Work now!

    But why the label5 (count of line selected about index in D) not is updataed when a i change the item from cbox?

    Sorry Hans how to insert in new tbox the gran total when i select a new item from cbox refered column I of sheet....

    Sorry for correction on post.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select from item and show data filtred... (200

    Because you don't have code to update the label in the ComboBox1_Change event procedure. Copy the line

    Label5.Caption = ...

    to ComboBox1_Change, immediately above its End Sub.

  9. #9
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select from item and show data filtred... (200

    Sorry Hans
    1)how to insert in new tbox the gran total when i select a new item from cbox refered column I of sheet....
    2) insert sub filter refered column A internal code in D, in this case inested textbox for column a insert a cbox from slelection
    In effect filtre for D and subfilter from A

    Sorry for correction on my last post.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select from item and show data filtred... (200

    You should be able to work this out yourself now, you've got all the ingredients.

  11. #11
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select from item and show data filtred... (200

    ok.... for "ingredient"...

    But the label5 is updating only if i move a scrollbar1, if i select a new item without move the scrollbar, remin in label5 the old value of last slelection, why?

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select from item and show data filtred... (200

    Did you read my reply in <post:=617,734>post 617,734</post:>, higher up in this thread?

  13. #13
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: select from item and show data filtred... (200

    Hi Hans help me only with the double filter, for grantotal i make a code after have completed this...
    The second filter, for me work, but not show the correct value in text box...

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: select from item and show data filtred... (200

    In ComboBox2_Change, you set a variable CEL1, then call SetFormValues1. But in SetFormValues1, you refer to CEL instead of CEL1.
    Also, CEL1 is in column A, not in column D, so you must change the column offsets in SetFormValues1.

Posting Permissions

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