Sub ShowListbyText(tmpControl As object, tmpKeyValue as string)
Dim inty As integer
select case tmpcontrol
case isa ComboBox
For intY = 0 To combobox(tmpControl).listcount -1
if lowercase(combobox(tmpControl).list(inty))= lowercase(tmpKeyValue) then
combobox(tmpControl).listindex=inty
exit for
end if
Next
case isa clsComboBox
For intY = 0 To clscombobox(tmpControl).listcount -1
if lowercase(clscombobox(tmpControl).list(inty))= lowercase(tmpKeyValue) then
clscombobox(tmpControl).listindex=inty
exit for
end if
Next
case isa popupmenu
For intY = 0 To popupmenu(tmpcontrol).listcount -1
if lowercase( popupmenu(tmpControl).list(inty))= lowercase(tmpKeyValue )then
popupmenu(tmpControl).listindex=inty
exit for
end if
Next
case isa clsPopupMenu
For intY = 0 To clspopupmenu(tmpcontrol).listcount -1
if lowercase( clspopupmenu(tmpControl).list(inty))= lowercase(tmpKeyValue )then
clspopupmenu(tmpControl).listindex=inty
exit for
end if
Next
end select
End Sub