password protected excel file

methode2404

New Member
Joined
Sep 3, 2018
Messages
30
Hi,

It is possible to write a macro, for closing password protected excel file, on wrong password entry and no-entry for 10 seconds.

regards
Metin
 

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
10,990
yes - but a user who gets in 30 seconds later could amend the macro........
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,784
Office Version
365, 2010
Platform
Windows, Mobile
If it is the same workbook and the only one open then when you close the workbook the macro will stop running. You can run a timer for 10 seconds before it closes but I don't see the benefit.
 

methode2404

New Member
Joined
Sep 3, 2018
Messages
30
I have a lot of user, they have to entry some data on their xls file and start a macro. This macro copy paste the data to "master'' xls.
This master xls should be closed for all time.
Some users could open (because of curiosity) the master xls. (master xls is password protected)
Master xls should close itself with wrong password entry, or also with no-entry

I have to make sure the master.xls is always closed.
 
Last edited:

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,784
Office Version
365, 2010
Platform
Windows, Mobile
If master.xls is protected how are they opening it?
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
11,784
Office Version
365, 2010
Platform
Windows, Mobile
Have you not hidden and password protected the VBA project?
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
4,341
just for info:

any smart user can break the sheet/vba project password very fast then he can see password contained in vba code
you can try obfuscate vba code and it will be quite a difficult time to recognize the password in the code
maybe any vba master will do that for you

have a nice day
 

methode2404

New Member
Joined
Sep 3, 2018
Messages
30
The password for VBA is not so important.
I need the code for : Closing workbook on wrong password entry and closing workbook if there no entry in 10 seconds
 

Forum statistics

Threads
1,086,259
Messages
5,388,734
Members
402,137
Latest member
pkulkarni

Some videos you may like

This Week's Hot Topics

Top