Skip to content

Instantly share code, notes, and snippets.

@joseph4tw
Created November 8, 2017 13:40
Show Gist options
  • Save joseph4tw/d518d0d6e757a9bc7c1ee3ef014a1a22 to your computer and use it in GitHub Desktop.
Save joseph4tw/d518d0d6e757a9bc7c1ee3ef014a1a22 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(ByVal someName As String)
someName = "Mr. " & someName
Debug.Print "PrintName: " & someName
End Sub
' Output
' PrintName: Mr. John
' DoWork: John
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment