#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default named range

hi,

i have a form dropdown/combobox. i would like to know how to use a named
range as the listfillrange. i know how to specify something like H12:H45 but
when i type the name of a named/defined range it does not work.

thanks in advance,
geebee

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default named range

Maybe

Private Sub UserForm_Activate()
For Each N In ActiveWorkbook.Names
ComboBox1.AddItem (N.Name)
Next
End Sub

ComboBox1.AddItem (N)
would add the address of the named range

ComboBox1.AddItem (N.Name) & N
would add the name and address

Mike

"geebee" wrote:

hi,

i have a form dropdown/combobox. i would like to know how to use a named
range as the listfillrange. i know how to specify something like H12:H45 but
when i type the name of a named/defined range it does not work.

thanks in advance,
geebee

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default named range

When you say "form dropdown/combobox", you mean a ComboBox on a UserForm,
right? If so, I cannot duplicate your problem... when I type the defined
Name into the RowSource property in the Properties window, it properly
assigns the defined range for that Name to the control.

--
Rick (MVP - Excel)


"geebee" (noSPAMs) wrote in message
...
hi,

i have a form dropdown/combobox. i would like to know how to use a named
range as the listfillrange. i know how to specify something like H12:H45
but
when i type the name of a named/defined range it does not work.

thanks in advance,
geebee


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default named range


if you mean in code, you have to do it like this:

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Range("test2").Address
End Sub


--


Gary

"geebee" (noSPAMs) wrote in message
...
hi,

i have a form dropdown/combobox. i would like to know how to use a named
range as the listfillrange. i know how to specify something like H12:H45 but
when i type the name of a named/defined range it does not work.

thanks in advance,
geebee



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
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM


All times are GMT +1. The time now is 10:16 AM.

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

About Us

"It's about Microsoft Excel"