Results 1 to 10 of 10

Thread: Copy Existing Sheet, Paste Values from existing workbook into new workbook

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    5
    Rep Power
    0

    File Samples

    Here's a sample of files & code - I've tried to preserve the code so that the original source is footnoted:
    1. Script #1 (Attached File) Uses the windows directory to select a file. I'd like this functionality in selecting the file & then the sheet within the file selection
    2. Script #2
    Code:
    Sub InsertTBLINE()
    'Developed by Casey Cline, 2011.
    'Opens source file. Currently path & file name must be manually updated monthly.
    Workbooks.Open ("J:\2011 Month End\2011 Reporting\\2011-07\2011-07 Recon_08.04.xlsx")
    
    'copy sheet from another workbook before first tab of Book2
    Workbooks("2011-07 Recon_08.04.xlsx").Sheets("TB 07.31.11").Copy After:=Workbooks("Reporting_v1.xlsm").Sheets("Sheet1")
    'Sheets("Sheet1").Select
    Sheets("Sheet1").Name = "Sheet1"
    
    'close the source workbook without saving any changes
     Workbooks("2011-07 Recon_08.04.xlsx").Close
          
    End Sub
    Script #3
    Code:
    Sub Link2Value()
       Dim rng As Range
       For Each rng In ActiveSheet.UsedRange.Cells
          If rng.HasFormula Then
             If InStr(rng.Formula, "\[") Then
                rng.Value = rng.Value
             End If
          End If
       Next rng
    End Sub
    Attached Files Attached Files

Similar Threads

  1. Replies: 2
    Last Post: 05-28-2013, 05:32 PM
  2. VBA Code to Open Workbook and copy data
    By Howardc in forum Excel Help
    Replies: 16
    Last Post: 08-15-2012, 06:58 PM
  3. VBA code to copy data from source workbook
    By Howardc in forum Excel Help
    Replies: 1
    Last Post: 07-30-2012, 09:28 AM
  4. Replies: 2
    Last Post: 04-08-2012, 09:42 AM
  5. Copy Sheets To New Workbook And Save
    By Prabhu in forum Excel Help
    Replies: 5
    Last Post: 09-06-2011, 09:35 PM

Posting Permissions

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