Office中国论坛/Access中国论坛
标题:
ACCESS中实现VB索引调用的简单例子
[打印本页]
作者:
andymark
时间:
2011-11-14 20:43
标题:
ACCESS中实现VB索引调用的简单例子
网友在
http://www.office-cn.net/thread-107144-1-1.html
中提出能否实现用CALL 调用带变量的过程名称,这里做了个简单的示例
Private Sub Form_Load()
Call SetupClick
End Sub
Private Function Test(Index As Integer)
MsgBox Me.Controls("Cmd" & Index).Caption
End Function
Private Sub SetupClick()
Dim I As Integer
For I = 1 To 3
Me.Controls("Cmd" & I).OnClick = "=Test(" & I & ")"
Next
End Sub
复制代码
[attach]47325[/attach]
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3