LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Go to sheet based on ListBox selection

UserForm2 allows user to enter maintenance records for a vehicle.
There is potentially more than 1 vehicle.

The user will select a vehicle shown in ListBox2. The list of vehicles
comes from range “VehicleMake” in sheet Vehicle Summary. Also, each
vehicle on that same list has its own range name. V__1, V__2, etc thru
V__10. Each of these range names contain no data until the user Adds
another vehicle, which is done via another UserForm prior to using
this UserForm. When a new vehicle is added, a sheet is created for the
new vehicle added. Sheet V #1 for the 1st vehicle added, sheet V #2
for the 2nd vehicle added, etc.

The user fills out the rest of UserForm2, then clicks OK.

What I need is for the data in UserForm2 to be entered in the correct
sheet based on the selection of the vehicle in ListBox2.

The problem I’m having is to decide how to direct the macro to look
for the correct sheet to put the data in.

Example, if the 1st vehicle is selected on the list in ListBox2, then
the data should go to sheet V #1. When the macro looks at which
vehicle was selected, I’m not sure if my coding should reference the
whole range of vehicles “VehicleMake”, or if it should reference the
range name of the 1st vehicle on the list, V__1.

I’ve never used a ListBox in a UserForm before.
Thanks
j.o.
 
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
Deleting Rows Based Upon ListBox Selection Paige Excel Programming 6 August 23rd 07 09:38 PM
change combobox values one by one based on selection in multiselect listbox Abdul[_2_] Excel Programming 0 November 7th 06 11:55 AM
Delete Row Based on Listbox Selection Hartman Excel Programming 1 April 26th 05 06:51 AM
Capture listbox selection to a cell in a different sheet Marcie Excel Programming 2 September 19th 03 12:15 PM


All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"