View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Joanne Joanne is offline
external usenet poster
 
Posts: 121
Default capture listbox click

Using MSOfficePro 2003, winxp proSP2

I want to generate a worksheet by grabbing some sheets from a different
wb - then dumping certain columns from the sheets I grabbed.

I have a table that contains CustName, CustStreet, CustCity, Vendor1,
Vendor2, Vendor3 (etc - it will vary by customer and the purpose of this
is to tell me which sheets to grab from the other wb) and I will always
be grabbing ColA, ColB and ColC plus one more column from the sheets I
keep from the original.

This table loads in a listbox so the user can make the choice which
customer they need to work with. The list box shows only the first 3
columns, but when the user clicks on a choice, I will need to capture
the information for the entire record.

My questions a
How (and where in the wb does the code go) do I capture the choice the
user makes. I think the code will go in the lstBox.click event and the
choice will be referenced by List1.ListIndex. That is about all I know
right now, and I am really wondering if the List1.ListIndex entry will
contain all of the fields present in the record - if it does, how do I
access the different fields in the record so that I can use them to
manipulate the dumping of certain sheets and columns in the original
workbook so the user gets only the relevant info?

If you know of a good example on the net or amongst the excel mvps that
I could study to help myself, I sure would appreciate being pointed in
that direction.

As always, thank you for your time and expertise
Joanne