Home |
Search |
Today's Posts |
#11
![]() |
|||
|
|||
![]()
You have a variable named ListType in your original code--but you didn't say
where it came from. This was your code: Select Case ListType Case 1 'Members Set ws = Worksheets("Member_list") irow = ws.Cells(Rows(lstSelect & ":" & lstSelect)) MemberType = 3 Load frmMember frmMember.txtMemID.Value = irow Case 2 'Deacons ws = Worksheets("Deacon_list") End Select I guessed that when you double clicked on an entry that you wanted something from the same row. And since you had "case 1" and "case 2", I figured that listtype had to be a number. Since I had nothing to go by, I guessed that maybe it was 8 columns to the right of that double clicked value. ListType = CLng(mySelectedCell.Offset(0, 8).Value) These were just guesses and would only be useful as a sample--I have no idea how your data looks. bach wrote: Dave, Could you tell me what that line of code is doing, what is the offset for. What should the listtype variable be set to, it is currently set to string for data but I get an error message of type mismatch. Bach I have played with the number is the offset setting the column number? -- bach ------------------------------------------------------------------------ bach's Profile: http://www.excelforum.com/member.php...o&userid=26134 View this thread: http://www.excelforum.com/showthread...hreadid=468634 -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UserForm Listbox in VBC | Excel Discussion (Misc queries) | |||
Help with Excel ActiveX listbox controls | Excel Discussion (Misc queries) | |||
Data Validation Cell - Move to UserForm | Excel Worksheet Functions | |||
Cell Content from UserForm Not Retained | Excel Discussion (Misc queries) | |||
How can I run a macro in the background whilst a UserForm is visib | Excel Discussion (Misc queries) |