0

I have a button on a sheet that gets information from other sheets then deletes every thing on the sheet with the button from cell C1 to Cell ff112 then displays the data.

This works fine when i have the workbook in exclusive mode so noone else can edit it, but When i "Protect and share" it the button deletes all cells including row A and B AND deletes the button.

Why does this button work differently in shared mode than non shared?

ok so I have narrowed it down to this code

Sub Eraser()
    Sheets("Batch Record Progress").Activate
    Workbooks("Work in Process.xls").Sheets("Batch Record Progress").Range("C1:FF112").Select
    Selection.Delete
    Workbooks("Work in Process.xls").Sheets("Batch Record Progress").Range("C1").Activate
End Sub
Liamck27
  • 99
  • 8

1 Answers1

0

Thanks to Mat's Mugs Link I was able to solve it
I'm still not sure why it worked differently in shared but it works now so thanks

Working code below

Sub Eraser()
    Workbooks("Work in Process.xls").Sheets("Batch Record Progress").Range("C1:FF112").Clear
    Sheets("Batch Record Progress").Activate
    Workbooks("Work in Process.xls").Sheets("Batch Record Progress").Range("C1").Activate
End Sub
Liamck27
  • 99
  • 8