+ Reply to Thread
Results 1 to 3 of 3

range name as rowsource of listbox?

  1. #1
    Stefi
    Guest

    range name as rowsource of listbox?

    Hi All,

    Can I use the name of a named range as rowsource of listbox? If so, how?
    I use XL2000, and when I tried to enter the name in the rowsource field of
    Properties window, I got a fatal error, that closed the whole XL application.

    Thanks,
    Stefi


  2. #2
    Michael Beckinsale
    Guest

    Re: range name as rowsource of listbox?

    Yes you can and it is entered without the " marks.

    If you want to do it on a form using VBA use the following code in the
    Form_Initialize code window

    cbxCat1.RowSource = "Category"

    Replace cbxCat1 & Category with your form name and named range respectively.
    Note in this instance the " marks are used.

    Regards

    Michael


    "Stefi" <Stefi@discussions.microsoft.com> wrote in message
    news:6669BEB2-C445-4C99-98E4-E969FEBE06F6@microsoft.com...
    > Hi All,
    >
    > Can I use the name of a named range as rowsource of listbox? If so, how?
    > I use XL2000, and when I tried to enter the name in the rowsource field of
    > Properties window, I got a fatal error, that closed the whole XL
    > application.
    >
    > Thanks,
    > Stefi
    >




  3. #3
    Stefi
    Guest

    Re: range name as rowsource of listbox?

    Thanks Michael for your response, you put me on the right track.
    I found that in
    >
    > cbxCat1.RowSource = "Category"
    >

    cbxCat1 is to be replaced with listbox name rather then form name!

    I found out that my problem was caused by using a non contiguous range in
    Rowsource! HELP doesn't mention that this is not allowed!!!

    Regards,
    Stefi


+ 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