Simple way to get around protect/unprotect sheet

Beginner35

New Member
Joined
Dec 9, 2013
Messages
10
Hello, i have been so frustrated with this below:

I have about 100 files and they all have this tab call "Oracle". Some of the file the "Oracle" tab is protected, some are not protected, some are protected with a password call 'ch'. My co-worker and I have been working on this issue but doesn't seem to able to find a simple solution. The end goal is to un-protect this Oracle sheet within a file doesn't matter there is password or no password or not protected to begin with and copy and paste the data on that tab into a new file. Please help!!!!

Sub Pickle()
Dim helen As Workbook
Dim helen2 As Workbook


Set helen2 = Workbooks.Add


Set helen = Workbooks.Open("h:\2014 Baseline\2014_13512 Chief Architect.xlsm")
helen.Activate
helen.Sheets("Oracle").Visible = True
helen.Sheets("Oracle").Unprotect Password:="ch"


Range("a5:au1228").AutoFilter Field:=29, Criteria1:="y"
Range("a5:au1228").Copy helen2.Sheets(1).Range("a5")


End Sub
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Glad to help. :)

Welcome to the forum, by the way!
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,930
Members
452,367
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top