Created
August 2, 2018 06:33
-
-
Save ron623/c6251ee314e7a75f0be114804048b00f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
★★★ 参照渡しの例 ★★★ | |
Sub Sample_Ref() | |
Dim str As String | |
str = "もとの文字です(*`▽´*)" | |
' 参照渡しで関数を呼び出す | |
Call CallByRef(str) | |
' 上記の関数内で処理した文字列をメッセージボックスにて表示 | |
MsgBox str | |
End Sub | |
' ★★★ 参照渡しの関数 ★★★ | |
Sub CallByRef(ByRef msg As String) | |
End Sub | |
msg = "値を変えました!" | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment