Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox - add manual entry to future list
Another query,
When a user enters a manual entry into the combobox on my userform want the userform to ask if this entry should be added to the drop-dow list for future use. I can manage most of this but I don't know what the statement would b for determining if the manual entry is in the existing list or not. if combobox1.value = 'one not in source list' then call userform2 etc Can anyone help -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox - add manual entry to future list
Same as any other type of comparison. You would loop through the list and
see if the value of the combobox matches any entry in the list. There is not built in setting or attribute that will tell you that information. You can also avoid a loop by using the worksheet Match function. -- Regards, Tom Ogilvy "cornishbloke " wrote in message ... Another query, When a user enters a manual entry into the combobox on my userform I want the userform to ask if this entry should be added to the drop-down list for future use. I can manage most of this but I don't know what the statement would be for determining if the manual entry is in the existing list or not. if combobox1.value = 'one not in source list' then call userform2 etc Can anyone help? --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox - add manual entry to future list
Hi Tom,
This would be the first time that I've needed to use a loop, so I'm not sure how to do what you suggest. Assuming my list is in cells A1:A10 and is named "ContList" how would I use loop through to check if the value of ContCombobox matches any in this range? Thank you for your patience! --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox - add manual entry to future list
Dim cell as range
Dim bMatch as boolean Dim ans as Variant for each cell in Range("ContList") if lcase(trim(cell.value) = me.Combobox1.Value then _ bMatch = True exit for ' found, no need to continue checking End if Next if not bMatch then ans = msgbox( "Add " & me.Combobox1.Value & " to list?", vbYesNo) if ans = vbYes then ' add to list end if End if -- Regards, Tom Ogilvy "cornishbloke " wrote in message ... Hi Tom, This would be the first time that I've needed to use a loop, so I'm not sure how to do what you suggest. Assuming my list is in cells A1:A10 and is named "ContList" how would I use loop through to check if the value of ContCombobox matches any in this range? Thank you for your patience! --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"What-if" formula for either a manual entry and automated entry | Excel Discussion (Misc queries) | |||
Creating a list with entries from cells and manual entry too | Excel Discussion (Misc queries) | |||
space left for future entry = #DIV/0! | New Users to Excel | |||
Preventing manual entry in dropdown list ... possible? | Excel Discussion (Misc queries) | |||
Manual or Formula entry in cell. | Excel Discussion (Misc queries) |