【发布时间】:2013-11-24 02:36:18
【问题描述】:
好的,我想在这个宏中添加一些东西
Sub Search()
Inputbox myInput
found = false
loop
Call getInput (myInput) '~> check multiple files
end loop
If found = false
'DO something
End if
End sub
Sub getInput(ByVal inputVar As String, ByVal Input as Boolean)
If a = inputVar Then
found = true '~> I want to pass this parameter back to search
End If
End sub
情况就像,我希望我的 sub 传递 found 参数 Search() 到 getInput() 然后 getInput() 将 found 参数返回给 搜索()
我是否应该添加类似 search(ByVal found as boolean) 之类的内容?
【问题讨论】:
-
您的
a子中的a是什么?并且您的循环语法无效.. -
函数可以返回值。你试过了吗?