+ Reply to Thread
Results 1 to 7 of 7

autcompletion

Hybrid View

  1. #1
    jad
    Guest

    autcompletion

    Hi, Everybody!

    I tried to combine the Dependent List feature from contextures.com
    (http://www.contextures.com/xlDataVal02.html) with the ComboBox feature
    (http://www.contextures.com/xlDataVal11.html), but I have relevant
    dificulties making the code work.

    The ideea is like this: the ComboBox works fine for the first column, it
    shows the validation list that i was expecting, but in the second column,
    that is dependent on the first one (validation list for second column is
    defined as "= INDIRECT(M70)") nothing shows. I tried to debug the code
    (watched the str variable) and it does not appear to evaluate the command, it
    actualy contains exactly this: = INDIRECT(M70).
    What troubles me is that i dont have at least this in the ComboBox list. It
    is just blank.

    I hope i expressed clearly what my problem is and i truly hope you can help
    me!
    Thank you very much in advance!

    jad


  2. #2
    Tom Ogilvy
    Guest

    RE: autcompletion

    the validation list for the second column should be a defined name that has a
    refers to formula =Indirect(M70)

    --
    regards,
    Tom Ogilvy




    "jad" wrote:

    > Hi, Everybody!
    >
    > I tried to combine the Dependent List feature from contextures.com
    > (http://www.contextures.com/xlDataVal02.html) with the ComboBox feature
    > (http://www.contextures.com/xlDataVal11.html), but I have relevant
    > dificulties making the code work.
    >
    > The ideea is like this: the ComboBox works fine for the first column, it
    > shows the validation list that i was expecting, but in the second column,
    > that is dependent on the first one (validation list for second column is
    > defined as "= INDIRECT(M70)") nothing shows. I tried to debug the code
    > (watched the str variable) and it does not appear to evaluate the command, it
    > actualy contains exactly this: = INDIRECT(M70).
    > What troubles me is that i dont have at least this in the ComboBox list. It
    > is just blank.
    >
    > I hope i expressed clearly what my problem is and i truly hope you can help
    > me!
    > Thank you very much in advance!
    >
    > jad
    >


  3. #3
    jad
    Guest

    RE: autcompletion



    "Tom Ogilvy" wrote:

    > the validation list for the second column should be a defined name that has a
    > refers to formula =Indirect(M70)
    >
    > --
    > regards,
    > Tom Ogilvy
    >

    i know and that is what i expect it to be.. so if for example i choose lets
    say "cdc" in first column .. i expect the validation list for column N70 to
    be = INDIRECT(M70), which should evaluate to = cdc, where cdc is an already
    defined list.. so i woul expect to see on my current cell a ComboBox that
    would allow me to choose from the values in the cdc list... but it is not
    like that... the ComboBox list is empty...

  4. #4
    Tom Ogilvy
    Guest

    RE: autcompletion

    I have already told you the answer, but you don't seem to be paying attention.

    =Indirect(M70)

    as the source for the list or as the ListfillRange isn't going to evaluate
    to =cdc

    If I put cdc in M70, then

    Insert Name define
    Name: List5
    Refersto: =Indirect($M$70)

    I did that, then I put a combobox from the control toolbox toolbar and set
    the ListFillRange to List5 and it worked fine for me.

    or if I put a data=>Validation with list option in a cell and in the list
    option specifiy
    =List5

    Again, it works fine.

    --
    Regards,
    Tom Ogilvy

    "jad" wrote:

    >
    >
    > "Tom Ogilvy" wrote:
    >
    > > the validation list for the second column should be a defined name that has a
    > > refers to formula =Indirect(M70)
    > >
    > > --
    > > regards,
    > > Tom Ogilvy
    > >

    > i know and that is what i expect it to be.. so if for example i choose lets
    > say "cdc" in first column .. i expect the validation list for column N70 to
    > be = INDIRECT(M70), which should evaluate to = cdc, where cdc is an already
    > defined list.. so i woul expect to see on my current cell a ComboBox that
    > would allow me to choose from the values in the cdc list... but it is not
    > like that... the ComboBox list is empty...


  5. #5
    jad
    Guest

    RE: autcompletion



    "Tom Ogilvy" wrote:

    > I have already told you the answer, but you don't seem to be paying attention.


    hmm. i already replyed to this post, but nothing appeared, so i will do it
    again. you are right, Mr. Ogilvy, i read your inital post too fast and didn't
    process it right, so thank you very much for detailing it in your second
    post.

    now the problem is that this doesn't realy cover my need. it is like this: i
    want cell N70 to refer to M70, but i want cell N71 to refer to M71. and i
    can't do lists that refer to INIDIRECT(Mxx) for each row. is there a way that
    this autoincrementes?

  6. #6
    Tom Ogilvy
    Guest

    RE: autcompletion

    If you are doing this with the "virtual combobox" the Debra has at her site,
    but just want the dropdown contents to be dependent on the value in the
    adjacent column, then you will be using code to manage the appearance of the
    combobox. In that code just assign the appropriate range (Modified code
    from Debra's site, 2nd reference)

    ' this line changed
    str = Range(Target.offset(0,-1).value).Address(1,1,xla1,true)
    ' line deleted
    With cboTemp
    'show the combobox with the list
    .Visible = True
    .Left = Target.Left
    .Top = Target.Top
    .Width = Target.Width + 5
    .Height = Target.Height + 5
    .ListFillRange = str
    .LinkedCell = Target.Address
    End With

    --
    Regards,
    Tom Ogilvy


    "jad" wrote:

    >
    >
    > "Tom Ogilvy" wrote:
    >
    > > I have already told you the answer, but you don't seem to be paying attention.

    >
    > hmm. i already replyed to this post, but nothing appeared, so i will do it
    > again. you are right, Mr. Ogilvy, i read your inital post too fast and didn't
    > process it right, so thank you very much for detailing it in your second
    > post.
    >
    > now the problem is that this doesn't realy cover my need. it is like this: i
    > want cell N70 to refer to M70, but i want cell N71 to refer to M71. and i
    > can't do lists that refer to INIDIRECT(Mxx) for each row. is there a way that
    > this autoincrementes?


  7. #7
    Tom Ogilvy
    Guest

    RE: autcompletion

    If you are doing this with the "virtual combobox" the Debra has at her site,
    but just want the dropdown contents to be dependent on the value in the
    adjacent column, then you will be using code to manage the appearance of the
    combobox. In that code just assign the appropriate range (Modified code
    from Debra's site, 2nd reference)

    ' this line changed
    str = Range(Target.offset(0,-1).value).Address(1,1,xla1,true)
    ' line deleted
    With cboTemp
    'show the combobox with the list
    .Visible = True
    .Left = Target.Left
    .Top = Target.Top
    .Width = Target.Width + 5
    .Height = Target.Height + 5
    .ListFillRange = str
    .LinkedCell = Target.Address
    End With

    --
    Regards,
    Tom Ogilvy


    "jad" wrote:

    >
    >
    > "Tom Ogilvy" wrote:
    >
    > > I have already told you the answer, but you don't seem to be paying attention.

    >
    > hmm. i already replyed to this post, but nothing appeared, so i will do it
    > again. you are right, Mr. Ogilvy, i read your inital post too fast and didn't
    > process it right, so thank you very much for detailing it in your second
    > post.
    >
    > now the problem is that this doesn't realy cover my need. it is like this: i
    > want cell N70 to refer to M70, but i want cell N71 to refer to M71. and i
    > can't do lists that refer to INIDIRECT(Mxx) for each row. is there a way that
    > this autoincrementes?


+ 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