Hi Bob,
Relying on users to select a particular cell on a sheet that is to be active when the macro is run is fraught with danger. It's far better to have the code work out for itself wherever possible what ranges it ought to work with; either that or have copious code for selection/activation validation and error-checking. To be sure, Excel 'knows' what cell(s) are selected on every sheet, but that's not to say those data are exposed to the vba object model when a sheet is inactive. In all Office applications, there are features/functions available via the GUI that are not exposed to vba.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|