+ Reply to Thread
Results 1 to 6 of 6

Copy Active Sheet and Save as specific name on cell value in current folder

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    64

    Copy Active Sheet and Save as specific name on cell value in current folder

    I have a workbook in a folder and I wish to copy a range of cells on the active sheet (currently sheet1) and save this as a separate workbook but in the same folder (active folder) as the other and name it as a file based on a value in cell a1 then return to the original workbook
    Any help with the VBA code would be greatly appreciated.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy Active Sheet and Save as specific name on cell value in current folder

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 01-19-2019 at 08:27 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Copy Active Sheet and Save as specific name on cell value in current folder

    Thank but it didn't work
    Got runtime error 1004
    "the operation requires the merged cells to be identically sized"

    Just to try this, I put all the cells to the sae width but still the same message and nothing is merged
    I will actually need to do this with some different sized cells and some of them merged

    When I debu,g is has stopped on line
    ActiveSheet.Range("A1").PasteSpecial xlPasteValues

    I'm confused

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy Active Sheet and Save as specific name on cell value in current folder

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    02-14-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Copy Active Sheet and Save as specific name on cell value in current folder

    Thank you so far

    This is what I am trying to achieve and example file attached
    This is the master file and as an example is stored in a folder C:\Desktop\Weather.
    The plan is to input certain data
    Date taken Cell D5
    Name of who took it in cell H1
    This then looks up and populates the current day and the follow six days C9 – I9
    The person the inputs the info on C20-I20 and C21-I21
    The cells in rows 22 – 22 are from a hidden pick list and are conditionally formatted
    Currently the only cells unlocked are the ones requiring inputs. The password is to leave blank

    Once this is populated, I will have a few buttons like email, or print which I am ok with doing
    I am struggling with the save option and I would like to click save and it will run a macro which will copy the info on the master sheet, save as a new workbook or PDF if easier but in the same active folder C:\Desktop\Weather and call it Weather Week Ahead and the date from cell D5 in the master
    Then revert back to the master file, clear out the unlocked cells and save as a blank ready for the next time. Thank you so far

    This is what I am trying to achieve and example file attached
    This is the master file and as an example is stored in a folder C:\Desktop\Weather.
    The plan is to input certain data
    Date taken Cell D5
    Name of who took it in cell H1
    This then looks up and populates the current day and the follow six days C9 – I9
    The person the inputs the info on C20-I20 and C21-I21
    The cells in rows 22 – 22 are from a hidden pick list and are conditionally formatted
    Currently the only cells unlocked are the ones requiring inputs. The password is to leave blank

    Once this is populated, I will have a few buttons like email, or print which I am ok with doing
    I am struggling with the save option and I would like to click save and it will run a macro which will copy the info on the master sheet, save as a new workbook or PDF if easier but in the same active folder C:\Desktop\Weather and call it Weather Week Ahead and the date from cell D5 in the master
    Then revert back to the master file, clear out the unlocked cells and save as a blank ready for the next time.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy Active Sheet and Save as specific name on cell value in current folder

    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. [SOLVED] macro to copy from a closed workbook on a desktop folder and save specific amended sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2017, 08:56 AM
  2. vba to print active sheet to pdf, auto save in specific folder then mail using outlook
    By lathamashly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2014, 04:57 AM
  3. How to copy Sheet to a new workbook and save to a specific folder
    By moxman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2014, 07:43 PM
  4. Save as CSV to specific folder on desktop and current date as filename
    By stokiejames09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2013, 05:52 PM
  5. macro to save specific sheet as pdf direct to folder linked via cell
    By sdts in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-17-2012, 05:45 AM
  6. Save current active sheet only
    By Zyphon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2008, 05:03 AM
  7. Command button - to copy active sheet and not save current workbook
    By vjboaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2008, 05:23 PM

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