+ Reply to Thread
Results 1 to 2 of 2

Macro Definitions - File Name Changes from Master Templates

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    London
    MS-Off Ver
    Office 2010
    Posts
    4

    Macro Definitions - File Name Changes from Master Templates

    Hi All

    I am hoping someone will be able to help.

    I am currently working on a performance document. I am working on the principle of having a master template which people can then access, Save As, and use to monitor performance around KPI’s.

    The issue I am having is around the name of the document changing when it is saved as, as all records have to retained. The macro I am struggling with is designed to unlock the workbook & worksheet, copy the worksheet specified into a new workbook and then return to the workbook the macro is held within and lock it back up. However, when the name changes it just locks the new workbook rather that the version I am asking it to.

    ActiveWorkbook.Unprotect Password:="KPIreview"
    ActiveSheet.Unprotect Password:="KPIreview"
    Sheets("EID Graphs").Select
    Sheets("EID Graphs").Copy
    Windows( _
    "Kent - Monthly Activity & Performance Review - Version 17 - Master.xlsm" _
    ).Activate
    ActiveSheet.Protect Password:="KPIreview", DrawingObjects:=True, Contents:=True, Scenarios:=True
    ActiveWorkbook.Protect Password:="KPIreview", Structure:=True, Windows:=False


    Is there anyway I can change the “Kent – Monthly Activity & Performance Review – Version 17 – Master.xlsm” statement within the macro to reflect the change in name of the document?

    Thank you in advance for any help you can provide.

  2. #2
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: Macro Definitions - File Name Changes from Master Templates

    Please Login or Register  to view this content.
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

+ 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. Macro to full in data from Master file to a daily recon file
    By Dnels in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-21-2013, 12:03 PM
  2. Replies: 0
    Last Post: 03-04-2013, 03:40 AM
  3. [SOLVED] Macro - Master file to import data from another open file with variable file name
    By jdodz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2012, 10:56 PM
  4. [SOLVED] Macro to copy file names and data from each file in a folder into master spreadsheet
    By dee1989 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-10-2012, 05:52 AM
  5. Running a Function or macro of child file from a Master file
    By ravinder_tigh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-01-2009, 11:25 PM

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