Selecting Rows Programmatically

A

Aaron Lampkin

I wish to use a listbox or combo box to select rows on a
worksheet. In A1, B1, and C1 I would like the listbox or
combo box. If the user selects a value in the control in
A1, I want that selection to determine the rows selected
in column B. If the user selects a value in the control
in B1, I want that selection to determine the rows
selected in column C. Basically, I want to duplicate the
features of the AutoSelect feature in Excel. Can this be
done?
 
T

Tom Ogilvy

Use the click event for the combobox (control toolbox toolbar) or assign a
macro to the dropdown box (forms toolbar).

In the code, you would write the instructions to interpret the selection and
make the appropriate selection in the appropriate column.

Since you provide no information on what is in the dropdown list or what
type of control, it is hard to provide any meaningful sample code.

I did a search in Excel help on "autoselect" and came up with nothing - so
your reference to autoselect isn't illustrative either.

If you mean something like Ctrl+Shift+8, to select contiguous rows and
columns, then I see what the user would be selecting from the combobox - if
you just need to trigger the selection, you could put a button in those
locations.

Post back with more info, or maybe someone else will know exactly what you
are describing.
 

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

Similar Threads


Top