Results 1 to 3 of 3

VBA Help - Copying file, save as

Threaded View

  1. #1
    Registered User
    Join Date
    06-09-2015
    Location
    Michigan
    MS-Off Ver
    2007
    Posts
    9

    VBA Help - Copying file, save as

    Hi everyone,

    So far, I have a macro that creates a new file and renames according to a cell. However, I'd like to be able to copy the file I'm running the macro on, save as according to a cell (which it does already), add something after the cell name "e.g. 'Cell name Q315' (if I could have a pop up box to ask what quarter/year I'd like it to say, that would be even better!). This is what I have so far:
    Sub CreateFiles()
    Dim lRow As Integer
    lRow = Range("AO" & Rows.Count).End(xlUp).Row
    For Each cell In Range("AO3:AO" & lRow)
    Workbooks.Add.SaveAs Filename:=cell.Value & ".xls"
    Next cell
    End Sub
    I couldn't figure out how to make it copy instead of creating a blank workbook... any help is appreciated!
    Last edited by alansidman; 10-21-2015 at 08:28 AM. Reason: code tags added

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. save as which remains the master file and save new file
    By ash3angel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-16-2015, 04:13 AM
  2. Macro needed to open "File Save As" and change save file type
    By blainerhett in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 02:40 PM
  3. Replies: 1
    Last Post: 09-05-2013, 02:39 PM
  4. Create save as new file for each row by copying all rows from another excell file
    By snsuvarna in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2013, 09:17 AM
  5. Save as macro that specifies file type, file location and takes file name from three cells
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-13-2013, 10:09 PM
  6. Copying specific data and save into new file
    By dpower in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2010, 02:53 PM
  7. [SOLVED] Excell2003 (SP-1) File > Save and File > Save As.. grayed out
    By Joe Murphy in forum Excel General
    Replies: 0
    Last Post: 03-09-2005, 06:06 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