Results 1 to 4 of 4

Addition to code to copy and pastes special values and cell format, but not links.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-02-2010
    Location
    Northumberland, England
    MS-Off Ver
    Excel 2016
    Posts
    143

    Addition to code to copy and pastes special values and cell format, but not links.

    Hi I have a small piece of code which helps me copy sheet 1 from 24 separate workbooks and then merges them into a singlwe workbook.
    what do I need to do the the code to allow it to only copy the cell formats and values without copying over the whole link to the original documents?
    Thanks

    Sub GetSheets()
     Path = "My File path"
     Filename = Dir(Path & "*.xls")
     Do While Filename <> ""
     Workbooks.Open Filename:=Path & Filename, ReadOnly:=True
     ActiveWorkbook.Sheets(1).Copy After:=ThisWorkbook.Sheets(1)
     Workbooks(Filename).Close
     Filename = Dir()
     Loop
     End Sub
    Last edited by singerbatfink; 05-13-2014 at 03:07 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 10-03-2012, 07:06 PM
  2. Replies: 2
    Last Post: 09-05-2012, 03:20 PM
  3. [SOLVED] Set code copy and paste special values
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2012, 08:52 PM
  4. [SOLVED] Code for Copy and Paste Special- Values in Columns
    By gautamacharya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2012, 04:51 PM
  5. [SOLVED] Copy and Paste Special (Formulas) pastes cell value if numeric
    By korrin.anderson@gmail.com in forum Excel General
    Replies: 1
    Last Post: 05-02-2006, 01:20 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