Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Driving me crazy!


Hi. I have the following code:

Private Sub lstcol_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
ICHANGE = lstcol.ListIndex + 1
With Range("checklist")
txtChange = .Cells(ICHANGE, 1)
cboDeptC.Text = .Cells(ICHANGE, 2)
End With
End Sub

I have two list boxes, namely department and employee. The department
list box displays the various departments and then the employee list
box is populated by the relevant employees that are assigned to the
selected department.

The results then also appear in a text box (txtChange) and combobox
(cboDeptC) fields so that the user can make changes to the employee and
which department they work on.

For example:

Employee A, Department 1
Employee B, Department 2
Employee C, Department 3
Employee D, Department 1
Employee E, Department 2
Employee F, Department 3
Employee G, Department 1

Upon selecting Department 2, employee B and E would appear in the
list...and when employee B is selected, what is shown in the textbox
and combobox is the data for employee A as that is the first record on
the worksheet.

How can I get it to look at the right record on the worksheet so that
the data in the textbox and combobox is correct?

If it would be easier to send you a copy of the file I'm working on
then please ask and I can send it through.

Many thanks in advance for your help.

Rob.

:)


--
RobEdgeler
------------------------------------------------------------------------
RobEdgeler's Profile: http://www.excelforum.com/member.php...o&userid=27336
View this thread: http://www.excelforum.com/showthread...hreadid=472801

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
Driving me CRAZY~ please help Tara New Users to Excel 0 July 7th 08 07:29 PM
Formula is driving me crazy????? Chris Watson Excel Worksheet Functions 19 February 13th 06 07:12 PM
Sorry for reposting - but this is driving me crazy! Bean123r Excel Discussion (Misc queries) 1 January 27th 06 02:31 PM
It doesn't add up - It's driving me crazy Francis Hayes (The Excel Addict) Excel Programming 10 February 28th 05 10:40 PM
Driving me crazy! Dick Kusleika[_3_] Excel Programming 0 October 21st 03 10:18 PM


All times are GMT +1. The time now is 05:30 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"