Forum

Notifications
Clear all

Simple Macro

3 Posts
2 Users
0 Reactions
64 Views
(@kwesmc1)
Posts: 31
Trusted Member
Topic starter
 

Hi, 

I need help with a simple macro I wrote. What I am trying to accomplish is to make sure any sheet a user copies to the workbook with any random worksheet name, it stays protected to make sure the code jumps any protected cell to the unprotected cells for input. Below is the code

Thanks in advance,

Ken Mc 

 Private Sub Workbook_Open()
    Dim WB As Workbook

     Set WB = ThisWorkbook
     WB.Protect

  WB.EnableSelection = xlUnlockedCells

End Sub

 
Posted : 10/12/2017 3:49 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Kenneth

You did not specify where the worksheet to be copied is coming from. Same workbook or different workbook?

I am assuming it can come from both and you want to protect the copied sheet to only allow users to select unprotected cells.

I hope my assumption is correct.

Sunny

 
Posted : 13/12/2017 12:11 am
(@kwesmc1)
Posts: 31
Trusted Member
Topic starter
 

Thank you so much Sunny. That did the trick....perfect!!

Kindest Regards,

Ken Mc

 
Posted : 13/12/2017 11:06 am
Share: