Learn how to declare variables in Excel VBA and understand the scope of variables between modules and sub routines. The complementary Excel file can be found here: http://hutsons-hacks.co.uk/excel-vba-variable-declaration-and-variable-scope/
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.