戻り値ありで処理をまとめるメモ。
common.bas
Dim answer As String
Dim result As String
'Function01
answer = Function01("Function01")
result = answer
'Function02
answer = Function02("Function02")
result = result & vbNewLine & answer
'Function03
answer = Function03("Function03")
result = result & vbNewLine & answer
'文字列表示
MsgBox result
Function Function01(txt As String)
txt = txt & "!"
'戻り値
Function01 = txt
End Function
Function Function02(txt As String)
txt = txt & "!!"
'戻り値
Function02 = txt
End Function
Function Function03(txt As String)
txt = txt & "!!!"
'戻り値
Function03 = txt
End Function
- 参考文献
Office VBA Reference