View Single Post
 
Old 07-25-2013, 05:14 PM
BobBridges's Avatar
BobBridges BobBridges is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default Finding the Selection in an inactive worksheet

I've been writing in VBA for Excel for years, and I just now got around to noticing that there's no Selection property for a worksheet; I guess it's just for the ActiveWindow. Yet now that I see that, what I want is to have my program detect which cell(s) are selected in a worksheet that isn't necessarily active. Surely it can be done; Excel knows, after all, for when I return to the worksheet the same cells are selected there that were before. So how can my program determine that?

(I realize I can Activate the worksheet; and it isn't even all that important not to do it, as it might be if, for example, I had to do it many times in a loop with many worksheets. Still, there must be a way.)
Reply With Quote