Macro - to unlock password-protected sheet in customized tab

noidea23

New Member
Joined
Feb 16, 2022
Messages
28
Office Version
  1. 2021
Platform
  1. Windows
Hi guys, i'm in the process of using vba to copy data from spreadsheets in subfolders, and paste it into a master copy. However, the sheets are password-protected and hidden (i.e., i have to click on the customized ribbon to enter a password to have the sheets become visible and accessible). I've tried using macro recorder but the recorder doesnt record the steps of unlocking the sheet.

Thus, i need some help on creating macros to unlock hidden & pw-protected sheets. Your help will be greatly appreciated!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
39,292
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
What exactly do you mean by "customized ribbon"?

Unhiding sheets shouldn't require a password unless the workbook is protected, in which case you want the workbook.unprotect method in your code.
 

noidea23

New Member
Joined
Feb 16, 2022
Messages
28
Office Version
  1. 2021
Platform
  1. Windows
oh it's a customized tab and under this tab, once i click on "my group", excel prompts me to enter a password. once the password is entered, the sheet will be unhidden.
 

Forum statistics

Threads
1,175,478
Messages
5,897,671
Members
434,668
Latest member
alteriusquiuus

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
Top