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

    Extend row source (2000 sr 1)

    ... i have this line of code and i have set only for 1000 line is possible to set the source until the last cell in K is filled?(userform2):

    .RowSource = ActiveSheet.Range("D4:M1000").Address

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

    Re: Extend row source (2000 sr 1)

    Dim lngMaxRow As Long
    lngMaxRow = Range("K65536").End(xlUp).Row
    .RowSource = "D4:M" & lngMaxRow

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

    Re: Extend row source (2000 sr 1)

    ok tks Hans....
    But now this is the scenario....
    The line of title is line 4 (AG. SK PERIOD. DESCRIZIONE CONTROLLO MATR. INS. DATA INS. MATR. RAT. DATA RIF. DATA INS./VER. FATTO)
    and the range is A5:J.....

    Naturally the new modify not work...:-(

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

    Re: Extend row source (2000 sr 1)

    You should be able to figure that out yourself.

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

    Re: Extend row source (2000 sr 1)

    solved but now, i have set 2 different sheet for each listbox but the record is the same for all listbox!?
    new file:
    http://www.mytempdir.com/497227

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

    Re: Extend row source (2000 sr 1)

    That is because you do not specify the worksheet in the row source. Use the following for ListBox1:

    .RowSource = "INSERIMENTI!A5:J" & lngMaxRow

    and similar for the other one, with INQUIRY instead.

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

    Re: Extend row source (2000 sr 1)

    good...
    if i have understand...i have the same effect to set RowSource from property of listbox in vba project?

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

    Re: Extend row source (2000 sr 1)

    Yes.

Posting Permissions

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