+ Reply to Thread
Results 1 to 7 of 7

Copying formats from one workbook to another

  1. #1
    Forum Contributor
    Join Date
    08-10-2017
    Location
    Lansing, Michigan
    MS-Off Ver
    2016
    Posts
    140

    Copying formats from one workbook to another

    I have this macro to copy the values from one workbook to another, but I also would like the formats to be copied as well. Any help is greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Copying formats from one workbook to another

    I think you'd need to copy the source range and then Paste Special the values AND the formats.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    08-10-2017
    Location
    Lansing, Michigan
    MS-Off Ver
    2016
    Posts
    140

    Re: Copying formats from one workbook to another

    Yeah thats what Im trying to do and I have something wrong here. I keep getting a 1004 error if I try to do it that way. The macro above works fine, just cant get it to work for the formats. Is there a better way to do this than what I have?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Copying formats from one workbook to another

    This
    Please Login or Register  to view this content.
    would need to change to
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-10-2017
    Location
    Lansing, Michigan
    MS-Off Ver
    2016
    Posts
    140

    Re: Copying formats from one workbook to another

    Thank you. This doesnt error out anymore, but it doesn't actually copy and paste the formats. There is no change in the result with the macro that I originally had and what you've changed.

  6. #6
    Forum Contributor
    Join Date
    08-10-2017
    Location
    Lansing, Michigan
    MS-Off Ver
    2016
    Posts
    140

    Re: Copying formats from one workbook to another

    I just separated the macros with one copying the values and one copying the formats while having one called after the other and it works fine. I'll mark as solved, thanks!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Copying formats from one workbook to another

    You're welcome.

+ 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. Replies: 0
    Last Post: 04-12-2015, 06:51 AM
  2. [SOLVED] Too many formats -- how to count formats in a workbook
    By macrorookie in forum Excel General
    Replies: 2
    Last Post: 07-09-2014, 03:41 PM
  3. Problem copying Page formats and print formats to another workbook
    By Chrisgeni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 08:05 AM
  4. Replies: 1
    Last Post: 11-22-2011, 02:36 PM
  5. Cell color formats when copying between workbook
    By jonesy8844 in forum Excel General
    Replies: 1
    Last Post: 05-02-2009, 03:01 PM
  6. Copying formats - column widths, formats, outlining to worksheets
    By DavidBr318 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2005, 09:05 AM
  7. Copying formats?
    By Thief_ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2005, 09:06 AM

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