Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arrays 将函数拆分为数组。类型不匹配错误#13_Arrays_Ms Access_Split_Vba_Type Mismatch - Fatal编程技术网

Arrays 将函数拆分为数组。类型不匹配错误#13

Arrays 将函数拆分为数组。类型不匹配错误#13,arrays,ms-access,split,vba,type-mismatch,Arrays,Ms Access,Split,Vba,Type Mismatch,我有一个字符串,其中有多个电子邮件地址,以分号分隔,并希望将它们拆分为单独的值 Dim RecipientArray()作为变量“我也尝试过作为字符串” Debug.Print txtRecipients.Value RecipientArray=Split(txtRecipients.Value,“;”)错误发生在此处 对于i=0到UBound(RecipientArray) 调试.打印RecipientArray(i) 下一个 将RecipientArray设置为普通变量,而不是变量数组 “

我有一个字符串,其中有多个电子邮件地址,以分号分隔,并希望将它们拆分为单独的值

Dim RecipientArray()作为变量“我也尝试过作为字符串”
Debug.Print txtRecipients.Value
RecipientArray=Split(txtRecipients.Value,“;”)错误发生在此处
对于i=0到UBound(RecipientArray)
调试.打印RecipientArray(i)
下一个

RecipientArray
设置为普通变量,而不是变量数组

“Dim RecipientArray()作为变量”我也尝试作为字符串
Dim RecipientArray作为变量

谢谢。实际上,我让它作为:Dim RecipientArray()作为字符串。我不知道为什么以前不起作用。出于好奇,我也尝试了你的解决方案,它也奏效了。再次感谢。