macro to hack in to another secured wkbk

cwunderlich

Board Regular
Joined
Sep 24, 2010
Messages
101
So here is what I have:

I have created a wkbk which has a macro automatically run upon opening the wkbk. First, the Enable/Disable macro pop up appears. Then, if you click "Enable Macros", a userform pops up asking for a password. If this password is entered correctly, the macro runs and unhides all sheets (which has sensitive info on them that only the user who knows the password should be able to open). However, if you select, the "Disable Macros" option, the wkbk just opens like normal and keeps the sheets with the sensitive info all hidden (the user can then only see 1 sheet, a sheet that should be visible to anyone opening up the file).
I have also put a password on the VBA code within the file.

I am now testing to see if this can be hacked into w/o knowing the file password. I have created a macro in a separate wkbk which opens up the secured file. I am trying to have the macro open this secured wkbk with the "Disable Macros" option. Is there a way to have a macro automatically open a wkbk in this manner? Im sure there is, I just don't know the syntax.

My thought is: that if I can get the macro to open the secured wkbk with the disable macro option, I can then have that same macro run an "Unhide All sheets" sub() that I have created, which will allow the hacker to see all the sheets.

Any help is much appreciated and let me know if this is not clear or if you have any questions.

I need this by the end of today... so plz help!!! and thanks!!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
In short, yes there is.

However, discussion about password cracking, hacking, or bypassing Excel security is strictly forbidden on these forums.

See rule 20.
 
Upvote 0
better yet, since I am pretty sure I can find a way for another macro to hack into this.

Is there a way to have the secured wkbk prevent/block any other macros from doing this sort of thing to it???
 
Upvote 0
Since this doesn't appear to be asking how to circumvent passwords per se, you want:
Code:
Application.EnableEvents = False
before you open the workbook. Set it back to True afterwards.

Edit to address the last question: no.
 
Upvote 0
so the question of whether or not it is possible for a file to block/prevent malicious macros can't be answered????!?
 
Upvote 0
No, I meant that your workbook can't block other macros.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,910
Members
452,949
Latest member
beartooth91

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