Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RowSource in ListBox Noah Excel Programming 2 November 17th 05 02:00 PM
Listbox Rowsource Headings Multi columns Copy Range If Then Conditional hgdev Excel Programming 0 February 27th 04 05:27 PM
RowSource in ListBox aet-inc[_2_] Excel Programming 1 December 3rd 03 12:41 AM
Is refreshing listbox rowsource in listbox click event possible? Jeremy Gollehon[_2_] Excel Programming 4 September 25th 03 06:45 PM
listbox rowsource Christy[_2_] Excel Programming 4 September 20th 03 11:44 PM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"