+ Reply to Thread
Results 1 to 11 of 11

Copy a range with text colour

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Copy a range with text colour

    Please Login or Register  to view this content.
    This code only copy the text from cell to cell, how about I want to copy the text with color?

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Copy a range with text colour

    Try:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    10-07-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Copy a range with text colour

    Thanks you so much, OllyXLS. Your code work at copy from sheet to sheet.

    Please Login or Register  to view this content.
    But one more problem I face here is, I want to copy data from worksheet into userform's spreadsheet, but the code din't work, it showed an error message which is "Copy method of Range class failed".

    Anyone know what is it or how to fix it?

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy a range with text colour

    A little clarification please - do you have a spreadsheet embedded in a userform? If so: please attach a sample.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Registered User
    Join Date
    10-07-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Copy a range with text colour

    Forum3.xlsm Here it is the problem.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Copy a range with text colour

    Aha, you're using a userform spreadsheet control which is part of Office Web Components 11.0 from Excel 2003.

    OWC is deprecated functionality - might be an idea to try to move away from that technology. Read http://support.microsoft.com/kb/972129

    As for making it work right now - I'm afraid I don't have any machines with OWC installed, so I'm afraid I can be of no further assistance on this one.


  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy a range with text colour

    I'm afraid Olly is right - I'm unable to resolve your issue - perhaps if you made it xls instead of xlsx??

  8. #8
    Registered User
    Join Date
    10-07-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Copy a range with text colour

    OllyXLS, it's free to download!

    Here is the link:

    http://www.microsoft.com/en-us/downl...ng=en&id=22276

  9. #9
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Copy a range with text colour

    Quote Originally Posted by sianjialin View Post
    OllyXLS, it's free to download!

    Here is the link:

    http://www.microsoft.com/en-us/downl...ng=en&id=22276
    No, I won't be installing (or learning) deprecated libraries, I'm afraid...

  10. #10
    Registered User
    Join Date
    10-07-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Copy a range with text colour

    Or is that others ways using VBA to display a range from other workbook or worksheet?

  11. #11
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Copy a range with text colour

    You must simply take two steps:
    Please Login or Register  to view this content.

+ 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: 1
    Last Post: 09-10-2013, 10:28 PM
  2. Getting range of cells with specific text colour, then using in a COUNTIF formulae
    By cheekyflash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2006, 08:58 PM
  3. change a range colour after copy to another worksheet
    By Kezza in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2006, 10:10 AM
  4. Cell Colour based on text in Range of cells
    By viewmaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2006, 11:53 PM
  5. Cell Colour based on text in Range of cells
    By viewmaster in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2006, 11:45 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