ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run time error 1004 (https://www.excelbanter.com/excel-programming/284210-run-time-error-1004-a.html)

Eric[_14_]

Run time error 1004
 
I have my workbook shared...and have been getting a Run
Time Error 1004. I've been trying to narrow down what is
causing it in my code and it appears that it is something
with the code below:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub

I understand sharing a workbook can make things a bit
finicky...but what am I doing wrong here?


All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com