我正在尝试在Access 2003中编写一个子例程,它从数组中的字符串中删除所有引号字符.子例程在例程本身中成功删除了引号,但在程序返回到传递函数时则不会.我很困惑,因为它是由ByRef完成的.
怎么称呼:
Call removeQuotes(wbs_numbers())
Run Code Online (Sandbox Code Playgroud)
和子程序本身:
'goes through a string array and removes quotes from each element in the array'
Sub removeQuotes(ByRef string_array() As String)
For Each element In string_array()
'chr(34) is quotation character. visual basic does not have escape characters.'
element = Replace$(element, Chr(34), "")
Next
End Sub
Run Code Online (Sandbox Code Playgroud)
有人可以解释一下我做错了什么吗?我永远爱你!
| 归档时间: |
|
| 查看次数: |
1012 次 |
| 最近记录: |