Combobox / Listbox中的字符而不是空格

时间:2015-11-15 14:10:31

标签: excel vba userform

在我的userform listbox / combobox中,我得到图片中显示的字符,其中应该有一个空格。

enter image description here

这可能很简单,但我不知道如何摆脱这个。

它出现的组合框中的文本是放入数组的范围。

1 个答案:

答案 0 :(得分:0)

您可以在控件(c)中的(r)范围内更改空间和chr(180),稍后您可以在导入和导出数据期间为其充电来自控制:

if instr(r.value,Chr(182))>0 then c.add replace(r.value, chr(182),chr(32)+chr(180)
if instr(c.text,chr(32)+chr(180))>0 then r.value = replace(c.text, chr(32)+chr(180),chr(13))