Grab the Free VBA Quick Reference Guide
https://www.chrisjterrell.com/excel-v...
In this Visual Basic Tutorial we show the differnece between the function (Which can return a value) and a Sub (which simply runs the Macro or VBA code).
We also use a Global Variable that can be used throughout the entire module.
Hope you Enjoy