PC Review


Reply
Thread Tools Rate Thread

Combox Box - Need to Reference Named Range

 
 
Benjamin
Guest
Posts: n/a
 
      17th Aug 2009
I have a drop down menu in a Form,
I'd like to have it reference a specific name range in a sheet.
I have a formula that creates the dynamic range automatically.
let's say for example "dynRange" is the Name of it.

I'd like to have a user double click the cell the form opens.
And then they Can select two different drop downs and a certain value
appears from that.

Question: How do I reference a Named Range in a DropDown "Combo box" and
what's the code/event procedure for if a user double clicks a cell, then I
can do the open.form

Thank you in advance!

 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      17th Aug 2009
hi
here is a double click event that will show your form.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim r As Range
Set r = Range("B2") 'change to suit
If Not Intersect(Target, r) Is Nothing Then
UserForm1.Show
Else
Exit Sub
End If
End Sub

it is the "named range" that has me confused. how are you creating it?
formula?
can you post your formula. and what do you want to do once the named range
is referenced.
you could use the add item method in the form's initialzation event to add
the name to the combo box. then what??????

regards
FSt1

"Benjamin" wrote:

> I have a drop down menu in a Form,
> I'd like to have it reference a specific name range in a sheet.
> I have a formula that creates the dynamic range automatically.
> let's say for example "dynRange" is the Name of it.
>
> I'd like to have a user double click the cell the form opens.
> And then they Can select two different drop downs and a certain value
> appears from that.
>
> Question: How do I reference a Named Range in a DropDown "Combo box" and
> what's the code/event procedure for if a user double clicks a cell, then I
> can do the open.form
>
> Thank you in advance!
>

 
Reply With Quote
 
Benjamin
Guest
Posts: n/a
 
      17th Aug 2009
=LISTS!$A$2:INDEX(LISTS!$A:$A,COUNTA(LISTS!$A:$A))
That gives me Combo Box 1
=INDEX(ValData,1,MATCH('Data Entry'!G6,LISTS!$1:$1,0)):
INDEX(ValData,Counter,MATCH('Data Entry'!G6,LISTS!$1:$1,0))
That will give me the Combo Box 2 's dependent value.

Then it will lookup a corresponding Code on a Lookup table.


"FSt1" wrote:

> hi
> here is a double click event that will show your form.
> Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
> Boolean)
> Dim r As Range
> Set r = Range("B2") 'change to suit
> If Not Intersect(Target, r) Is Nothing Then
> UserForm1.Show
> Else
> Exit Sub
> End If
> End Sub
>
> it is the "named range" that has me confused. how are you creating it?
> formula?
> can you post your formula. and what do you want to do once the named range
> is referenced.
> you could use the add item method in the form's initialzation event to add
> the name to the combo box. then what??????
>
> regards
> FSt1
>
> "Benjamin" wrote:
>
> > I have a drop down menu in a Form,
> > I'd like to have it reference a specific name range in a sheet.
> > I have a formula that creates the dynamic range automatically.
> > let's say for example "dynRange" is the Name of it.
> >
> > I'd like to have a user double click the cell the form opens.
> > And then they Can select two different drop downs and a certain value
> > appears from that.
> >
> > Question: How do I reference a Named Range in a DropDown "Combo box" and
> > what's the code/event procedure for if a user double clicks a cell, then I
> > can do the open.form
> >
> > Thank you in advance!
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
reference named range Michael Microsoft Excel Programming 2 18th Aug 2009 04:27 PM
reference first cell in a named range Robert H Microsoft Excel Worksheet Functions 3 14th Jan 2008 07:53 PM
automatic range - named range give me circular reference... George Thorogood Microsoft Excel Misc 0 22nd Feb 2007 07:53 PM
use cell reference for named range elf21 Microsoft Excel Discussion 5 20th Feb 2006 01:32 AM
Reference a named range =?Utf-8?B?Sm9obiBNLg==?= Microsoft Excel Programming 2 8th Oct 2005 07:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:33 PM.