View Single Post
 
Old 02-10-2016, 01:55 AM
Debaser's Avatar
Debaser Debaser is offline Windows 7 64bit Office 2010 32bit
Competent Performer
 
Join Date: Oct 2015
Location: UK
Posts: 221
Debaser will become famous soon enough
Default

The public declarations don't really belong in the ThisWorkbook module - they should be in a regular module. If you have them in ThisWorkbook, you need to access them as members of that object from other modules - i.e. use ThisWorkbook.variable_name and not just variable_name.

You could turn your routine into a function that returns True if everything is ok and False otherwise. Then the deactivate event can check the return value and simply reactivate the sheet if need be.
Reply With Quote