There is no issue doing it in the workbook open code, BUT if you dim a variable inside a sub, then it stops existing once the sub is done... put it at the very top of the workbook module:
Also, a type 8 inputbox requires the entry to be a cell reference, while I believe you want text, so I changed it to type 2
The word Public makes the variable available to all modules, while Private would make it available only to subs within the module it is declared in.
Also, we use SET only for objects, so I removed that word from your code.
Bookmarks