View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default activeworkbook and thisworkbook

On 16 Jul., 00:08, salgud wrote:
At the beginning of a macro I'm writing, I'm trying to test to make sure
that the activeworkbook is not the one the macro is in. I put this line in:

If ActiveWorkbook = ThisWorkbook Then

followed by a message box to the user. But I'm getting an "Object doesn't
support this property or method" error on this line. How do I text this
correctly?
Thanks again!


Hi

Try this:

If ThisWorkbook.Name = ActiveWorkbook.Name Then

Regards,
Per