Soaring Eagle
New Member
- Joined
- Apr 16, 2009
- Messages
- 7
Hey all,
I have posted this problem on VBA Express also, If you would like to see the history of my post and the replies here is the link...
http://www.vbaexpress.com/forum/showthread.php?t=26269
I am trying to populate a ComboBox on a user form with a list that is on a different sheet in the same workbook. This list will be popluated by code that I have already written and that part works great, but I am new to UserForms and do not know how to populate the ComboBox with the values in the list. I have had several suggestions from all the wonderful Vbaxers but to no avail, I am still having problems. I have posted a sample of the workbook on VBA Express and would do the same here but for some reason it says "You may not post attachments". If you want to see the sample workbook I have it attached on VBA Express. There are actually two different things I am trying to accomplish.
1. I want either a list box or combo box that will get its contents from a range that is located on another sheet in the same workbook. This list is a single column but will change in length fairly regularly through code I have already written in another module which is working perfectly. I was trying to set the RowSource property but I cannot get it to work and take into account when the list changes. I figured it may be better to reference it with a named range but I do not know how to pass the named range to the list box or combo box. What this list box/combo box will do is search for a match on the sheet that calls the user form then move to that cell.
2. On the same user form there will be 3 - 4 text boxes which will pass new data into the cells once the "Enter" button is pushed. I know how to pull up a blank userform and pass the entrys in the userform to cells but what I would like is once the list box/combo box moves to the cell it searched for I would like the text boxes on the user form to populate with any values that are currently in those cells (if any) or blank if no values exist which can then be overwritten with new values to be passed to the cells. Any suggestions?
I have posted this problem on VBA Express also, If you would like to see the history of my post and the replies here is the link...
http://www.vbaexpress.com/forum/showthread.php?t=26269
I am trying to populate a ComboBox on a user form with a list that is on a different sheet in the same workbook. This list will be popluated by code that I have already written and that part works great, but I am new to UserForms and do not know how to populate the ComboBox with the values in the list. I have had several suggestions from all the wonderful Vbaxers but to no avail, I am still having problems. I have posted a sample of the workbook on VBA Express and would do the same here but for some reason it says "You may not post attachments". If you want to see the sample workbook I have it attached on VBA Express. There are actually two different things I am trying to accomplish.
1. I want either a list box or combo box that will get its contents from a range that is located on another sheet in the same workbook. This list is a single column but will change in length fairly regularly through code I have already written in another module which is working perfectly. I was trying to set the RowSource property but I cannot get it to work and take into account when the list changes. I figured it may be better to reference it with a named range but I do not know how to pass the named range to the list box or combo box. What this list box/combo box will do is search for a match on the sheet that calls the user form then move to that cell.
2. On the same user form there will be 3 - 4 text boxes which will pass new data into the cells once the "Enter" button is pushed. I know how to pull up a blank userform and pass the entrys in the userform to cells but what I would like is once the list box/combo box moves to the cell it searched for I would like the text boxes on the user form to populate with any values that are currently in those cells (if any) or blank if no values exist which can then be overwritten with new values to be passed to the cells. Any suggestions?