+ 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
    124

    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 2003,2007,2010
    Posts
    28,549

    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 - Excel Aid

    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
    124

    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 2003,2007,2010
    Posts
    28,549

    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
    124

    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
    124

    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 2003,2007,2010
    Posts
    28,549

    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)

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