I haven't worked much with global/public variables but I'm having problems in getting different parts of my program to share data.
I've created a program that searches for people's names on one spreadsheet and assignes the name to a variable. After doing that, it calls a function but I can't pass the name that's stored in the variable to the function. I would like to know how to declare a global/public variable so when it calls a function, it can pass the value.
----------------------------------------------------
Sub DoThis()
Global strName As String
strName = Range("A1").Address
DoThat
End Sub
----------------------------------------------------
Function DoThat()
MsgBox "Name: " & strName
End Function
----------------------------------------------------