Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Go To combobox

Hi,
I have inserted a combobox on a worksheet that I want to act as a record
selector for showing one record from my list of 500+ entries. Trouble is I
have no idea how to write a code to achieve this. Any help or sample odes
would be appreciated.

Regards
gregork


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Go To combobox

Grgeor,

From previous posts I will assume an activeX control. You need to identify a
key column, lets say B. Set the ListFillrange property for the cells in
column B, and then use the .ListIndex property on a combobox click event to
identify which record (it will equate to the row - 1).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gregork" wrote in message
...
Hi,
I have inserted a combobox on a worksheet that I want to act as a record
selector for showing one record from my list of 500+ entries. Trouble is I
have no idea how to write a code to achieve this. Any help or sample odes
would be appreciated.

Regards
gregork




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Go To combobox

Thanks Bob. I've managed to set the ListFillrange property successfully and
my combobox now displays a list of all the records in A3:A500 but I am
afraid you lost me on the code for the click event. Could you be more
specific I have no idea how to write a code to make the cell I selected in
the combobox be the go to cell . I guess I would need to make the cell
selected highlighted or maybe just have the cursor go to the cell.

Many Thanks
gregork


"Bob Phillips" wrote in message
...
Grgeor,

From previous posts I will assume an activeX control. You need to identify

a
key column, lets say B. Set the ListFillrange property for the cells in
column B, and then use the .ListIndex property on a combobox click event

to
identify which record (it will equate to the row - 1).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gregork" wrote in message
...
Hi,
I have inserted a combobox on a worksheet that I want to act as a record
selector for showing one record from my list of 500+ entries. Trouble is

I
have no idea how to write a code to achieve this. Any help or sample

odes
would be appreciated.

Regards
gregork






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Go To combobox

Gregor,

Let's assume that the records are in the range H1:M500. The click event
would look like this

Private Sub ComboBox1_Click()
Range("H1:M500")(ComboBox1.ListIndex + 1, 1).Select
End Sub

It would be better to name the range and use that of course.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gregork" wrote in message
...
Thanks Bob. I've managed to set the ListFillrange property successfully

and
my combobox now displays a list of all the records in A3:A500 but I am
afraid you lost me on the code for the click event. Could you be more
specific I have no idea how to write a code to make the cell I selected in
the combobox be the go to cell . I guess I would need to make the cell
selected highlighted or maybe just have the cursor go to the cell.

Many Thanks
gregork


"Bob Phillips" wrote in message
...
Grgeor,

From previous posts I will assume an activeX control. You need to

identify
a
key column, lets say B. Set the ListFillrange property for the cells in
column B, and then use the .ListIndex property on a combobox click event

to
identify which record (it will equate to the row - 1).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gregork" wrote in message
...
Hi,
I have inserted a combobox on a worksheet that I want to act as a

record
selector for showing one record from my list of 500+ entries. Trouble

is
I
have no idea how to write a code to achieve this. Any help or sample

odes
would be appreciated.

Regards
gregork








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Go To combobox

Thanks for spelling it out for me Bob.

Kind Regards
gregork

"Bob Phillips" wrote in message
...
Gregor,

Let's assume that the records are in the range H1:M500. The click event
would look like this

Private Sub ComboBox1_Click()
Range("H1:M500")(ComboBox1.ListIndex + 1, 1).Select
End Sub

It would be better to name the range and use that of course.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gregork" wrote in message
...
Thanks Bob. I've managed to set the ListFillrange property successfully

and
my combobox now displays a list of all the records in A3:A500 but I am
afraid you lost me on the code for the click event. Could you be more
specific I have no idea how to write a code to make the cell I selected

in
the combobox be the go to cell . I guess I would need to make the cell
selected highlighted or maybe just have the cursor go to the cell.

Many Thanks
gregork


"Bob Phillips" wrote in message
...
Grgeor,

From previous posts I will assume an activeX control. You need to

identify
a
key column, lets say B. Set the ListFillrange property for the cells

in
column B, and then use the .ListIndex property on a combobox click

event
to
identify which record (it will equate to the row - 1).

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"gregork" wrote in message
...
Hi,
I have inserted a combobox on a worksheet that I want to act as a

record
selector for showing one record from my list of 500+ entries.

Trouble
is
I
have no idea how to write a code to achieve this. Any help or sample

odes
would be appreciated.

Regards
gregork










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
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Combobox M Excel Discussion (Misc queries) 1 March 7th 05 10:29 AM
comboBox defj Excel Programming 4 November 27th 03 06:40 AM
Combobox Tony G[_2_] Excel Programming 1 October 24th 03 01:53 PM
combobox scrabtree23 Excel Programming 0 September 9th 03 01:42 PM


All times are GMT +1. The time now is 09:42 AM.

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"