+ Reply to Thread
Results 1 to 2 of 2

Protect VBA code using VBA code.

  1. #1
    Registered User
    Join Date
    08-12-2009
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2007
    Posts
    53

    Protect VBA code using VBA code.

    Hi,
    I am using the following code to copy and save a worksheet from a workbook as a separate workbook. The worksheet that is being saved as a separate workbook contains some VBA, which also gets saved in the process. The problem I have is protecting the VBA code within the copied worksheet as it is transfered to a new workbook. The code is protected within the original workbook.

    Please Login or Register  to view this content.
    Is it possible to set the password to protect the code in the new workbook while creating the workbook within the above code? Help!!

  2. #2
    Registered User
    Join Date
    08-12-2009
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Protect VBA code using VBA code.

    Solved it using a template instead of copying to a new workbook.
    e.g.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Protect/Unprotect code causing out of range error in code
    By Petrolcb41 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2010, 02:34 PM
  2. Protect Sheet & Password Protect Code
    By KLahvic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-13-2009, 04:08 PM
  3. How to protect desired area of workbook and protect code.
    By avveerkar in forum Excel General
    Replies: 4
    Last Post: 01-12-2006, 10:44 PM
  4. Generic protect/unprotect code through buttons and code?
    By StargateFanFromWork in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-02-2006, 03:35 PM
  5. Replies: 5
    Last Post: 08-09-2005, 11:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1