Copying Specific Columns Into A New Worksheet

  • Re: Copying Specific Columns Into A New Worksheet


    uh, no... oh dear.


    I mean, this part of the code:

    Code
    Dim myReplaceWith$ 
        myReplaceWith = "" ' jiuk - edit as needs be


    Defines a constant to replace awkward ASCII characters with; this part of the code:

    Code
    vResult = Application.WorksheetFunction.Substitute(vResult, Chr(10), myReplaceWith) 
        vResult = Application.WorksheetFunction.Substitute(vResult, Chr(13), myReplaceWith)


    Uses this value.


    So if you change the line in question to:

    Code
    myReplaceWith = " " ' jiuk - edit as needs be


    Then the function will replace characters with space
    This:

    Code
    myReplaceWith = " Cheeky Charlie is a wonderful man " ' jiuk - edit as needs be


    Would make the code functionally superb in every way.


    HTH

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!