Skip to content

Instantly share code, notes, and snippets.

@joseph4tw
Created November 8, 2017 13:51
Show Gist options
  • Save joseph4tw/65690ffacf34362e3c2fc741e10362e1 to your computer and use it in GitHub Desktop.
Save joseph4tw/65690ffacf34362e3c2fc741e10362e1 to your computer and use it in GitHub Desktop.
Option Explicit
Public Sub DoWork()
Dim name As String
name = "John"
Call PrintName(name)
Debug.Print "DoWork: " & name
End Sub
Private Sub PrintName(ByRef someName As String)
someName = "Mr. " & someName
Debug.Print "PrintName: " & someName
End Sub
' Output
' PrintName: Mr. John
' DoWork: Mr. John
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment