Combobox question

L

lc

Hi,

I am trying to create a combo box such that when I select a value from
the combo box, it will link me to a cell I had specified.

I am also trying to create another combo box such that when I select a
value from the combo box, it will link me to another worksheet of the
same workbook.

Any help is greatly appreciated.

Thanks.

lc
 
T

Tom Ogilvy

In the linkedcell property

Sheet1!A1

would like the combobox to cell A1 on Sheet1.
 
L

lc

What I really want to do is to link each selection with a differenct
cell. For example, if my input range consists of the following
information:

1. a
2. b
3. c
4. d

The cells I want my selection to link to is:

1. C100
2. A20
3. D40
4. F50

When I select "a" from the combo box, it will go to the cell C100.
When I select "b" from the combo box, it will go to cell A20.
etc.

I hope this clarifies my question

Thanks.
 
T

Tom Ogilvy

Private Sub Combobox1_Click()
Dim v as Variant
v = Array("C100","A20","D40","F50")
if combobox1.listindex <> -1 then
Range(v(combobox.ListIndex + 1)).Select
end if
End Sub
 
L

lc

Hi,

I was wondering what the code would be if I want it to select sheets
instead of cells. I have tried changing "C100, A20, D40, F50" to the
sheet names but it did not work.

Any help would be greatly appreciated.

Thanks.

lc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top