+ Reply to Thread
Results 1 to 3 of 3

Save file as copy while still having original still open

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-23-2010
    Location
    Staten Island, NY
    MS-Off Ver
    Excel 2003
    Posts
    242

    Save file as copy while still having original still open

    I use this code to create a copy of a workbook but I want to keep the original still open. However it is just saving the original as the new file (so the new one is not open). What am I doing wrong?

    strSavelocation = "H:\" & Environ("Username") & "\" & strReportName & strExtension
    
            wbRef.SaveCopyAs strSavelocation
            Set wbWorking = ActiveWorkbook
            wbWorking.SaveAs strSavelocation, lngFileFormat
            Set wbWorking = Workbooks.Open(strSavelocation)

  2. #2
    Forum Contributor
    Join Date
    08-23-2010
    Location
    Staten Island, NY
    MS-Off Ver
    Excel 2003
    Posts
    242

    Re: Save file as copy while still having original still open

    I made some changes but still not working out correctly:

    strSavelocation = "H:\" & Environ("Username") & "\" & strReportName & strExtension
            wbRef.SaveCopyAs (wbRef.FullName & ".copy" & fnFileExt(wbRef))
            Workbooks.Open wbRef.FullName & ".copy" & fnFileExt(wbRef)
            Set wbCopy = ActiveWorkbook
            wbWorking.SaveAs strSavelocation, lngFileFormat
            Set wbWorking = Workbooks.Open(strSavelocation)

  3. #3
    Forum Contributor
    Join Date
    08-23-2010
    Location
    Staten Island, NY
    MS-Off Ver
    Excel 2003
    Posts
    242

    Re: Save file as copy while still having original still open

    anyone have any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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