Question:

Run Macro in protected Workbook

by  |  earlier

0 LIKES UnLike

I'm using Ms. Excel 2007. I can't run my macro when my workbook structure is protected. Is there anyway i can do to do run macro while my workbook is protected?

 Tags:

   Report

2 ANSWERS


  1. Java tutorials-http://aboutjava.org/


  2. Put this line of code as the 1st line of your macro within the Sub

    ThisWorkbook.Protect password:="myPassword", Structure:=True, Windows:=False

    put this line of code as the 1st line of your macro within the Sub

    ThisWorkbook.Unprotect password:="myPassword"

    Note: the password to unprotect/protect the workbook structure in the above case is myPassword (case sensitive), change that to yours.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.