View Single Post
 
Old 09-30-2013, 01:31 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote