Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any action after ending command in breaking mode 1

Status
Not open for further replies.

lopko

Technical User
Jul 13, 2005
4
SK
Hallo, I've got this problem.
Before and after execution of macro I need to have some sheet hiden and workbook protected. With this is no problem. But during the execution of macro, when I break it and click end of execution, everything stays open (sheets, workbook is unprotected), because uring the execution I need to have it unprotected and shown. Can I handle this any?

Thank's a lot.

Lopko
 
Hi,
it is not quite true that you need to have workbook/worksheets visible and unprotected.
After opening a workbook, you can execute 'Protect' method (both for workbook and any of sheets) with your password repeated and UserInterfaceOnly:=True. This will allow to freely change prtected workbook by code.
You can control manual breaking of code execution by setting Application.EnableCancelKey.
Finally, by proper referencing workbooks/worksheets you can work with hidden/nonactive workbooks/sheets.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top