Have you tried using ThisWorkbook instead of ActiveWorkbook?