Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
if u have arange maybe $B$31:$B$43 And i have the values from this range in a combobox how do i get det address from the range when i select a value in my combo box. Let us say that $B$31:$B$43 is numbers and in $B$40 are there maby number 8 i select number 8 in my combobox and the I want to use the address where number 8 are, in this case $B$40 Hope someone can help Alvin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi again,
A simple Userform with a combobox and textbox. The combobox is filled with data from named range "MyRange": selection form the combobox puts the address of the element of "MyRange" in the textbox. HTH Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Dim rng As Range Set rng = Range("Myrange") n = CInt(ComboBox1.Value) TextBox1.Value = rng(n).Address End Sub Private Sub UserForm_Initialize() ' "MyRange" is , for example, "A11:A20" with values 1 to 10 ComboBox1.RowSource = "MyRange" End Sub "alvin Kuiper" wrote: Hi if u have arange maybe $B$31:$B$43 And i have the values from this range in a combobox how do i get det address from the range when i select a value in my combo box. Let us say that $B$31:$B$43 is numbers and in $B$40 are there maby number 8 i select number 8 in my combobox and the I want to use the address where number 8 are, in this case $B$40 Hope someone can help Alvin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Toppers
you are the best many many thanks Alvin "Toppers" wrote: Hi again, A simple Userform with a combobox and textbox. The combobox is filled with data from named range "MyRange": selection form the combobox puts the address of the element of "MyRange" in the textbox. HTH Private Sub ComboBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Dim rng As Range Set rng = Range("Myrange") n = CInt(ComboBox1.Value) TextBox1.Value = rng(n).Address End Sub Private Sub UserForm_Initialize() ' "MyRange" is , for example, "A11:A20" with values 1 to 10 ComboBox1.RowSource = "MyRange" End Sub "alvin Kuiper" wrote: Hi if u have arange maybe $B$31:$B$43 And i have the values from this range in a combobox how do i get det address from the range when i select a value in my combo box. Let us say that $B$31:$B$43 is numbers and in $B$40 are there maby number 8 i select number 8 in my combobox and the I want to use the address where number 8 are, in this case $B$40 Hope someone can help Alvin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Combobox1_Click()
msgbox "B" & 31 + Userform.Combobox1.ListIndex End Sub -- Regards, Tom Ogilvy "alvin Kuiper" wrote in message ... Hi if u have arange maybe $B$31:$B$43 And i have the values from this range in a combobox how do i get det address from the range when i select a value in my combo box. Let us say that $B$31:$B$43 is numbers and in $B$40 are there maby number 8 i select number 8 in my combobox and the I want to use the address where number 8 are, in this case $B$40 Hope someone can help Alvin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return cell adress for next non-blank cell in a range | Excel Worksheet Functions | |||
ComboBox Range | Excel Programming | |||
Show one range in a combobox and write the 2nd range! | Excel Programming | |||
ComboBox.Value To Range | Excel Programming | |||
Adress of Copied Range | Excel Programming |