比如下面这函数中return语句功能在vb中怎么实现Public Function x(ByVal y As String) As String return yEnd Function
你是返回x的值吧?如果返回x的值你只要 Public Function x(ByVal y As String) As String x="你要给的值"End Function假如你要返回y的值,你只需要在function外定义一个变量y 然后用址传递就可以 Public Function x(ByRef y As String) As String y="你要给的值"End Function
exit function(函数)
exit sub(事件过程)
return yEnd Function
Public Function x(ByVal y As String) As String
x="你要给的值"End Function假如你要返回y的值,你只需要在function外定义一个变量y
然后用址传递就可以
Public Function x(ByRef y As String) As String
y="你要给的值"End Function
不过你的例子中return没有必要。