View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] oldyork90@yahoo.com is offline
external usenet poster
 
Posts: 59
Default application.activesheet, should I use it?


You can set a fully qualified ref to the sheet executing the macro, at

the top of the macro...



Dim wksCaller As Worksheet

Set wksCaller = ActiveSheet



..so if the macro activates any other sheets during runtime, your code

will always know which sheet the button clicked is on. (Note that

rarely is it necessary to change sheets!)


Thanks!

That's presently what I do and so far no problems. But is that really "atomic" so to speak. Can I be sure that while the current routine is queuing up the sheet remains active? I ran into a property call parent and am starting to think about that.