http://www.koikikukan.com/archives/2014/03/28-015555.php
へぇ、他の言語( javascript や java )でもできるのかな?
'VBAで関数名に変数を使う Sub Test() Dim name As String name = 1 Application.Run "call_" & name End Sub Sub call_1() MsgBox "OK" End Sub
'関数に引数を追加する Sub Test() Dim name As String name = 1 Dim id As Integer id = 100 Dim value As String value = "bar" Application.Run "call_" & name, id, value End Sub Sub call_1(id As Integer, value As String) MsgBox id & value End Sub