prim80481:Invisible Characters Added To End Of Copied Data

prim80481:Invisible Characters Added To End Of Copied Data

Solution ID: prim80481 Invisible Characters Added To End Of Copied Data Status: Reviewed Version(s): 8.5 Problem: Remove any invisible ASCII characters from the end of data copied & pasted into Pertmaster cells. Problem: Invisible Characters Added To End Of Copied Data Problem: When copying data from existing Pertmaster userfield cells or from an external application

Solution ID: prim80481
Invisible Characters Added To End Of Copied Data
Status: Reviewed
Version(s): 8.5
Problem: Remove any invisible ASCII characters from the end of data copied & pasted into Pertmaster cells.
Problem: Invisible Characters Added To End Of Copied Data
Problem: When copying data from existing Pertmaster userfield cells or from an external application such as Excel & pasting it in different userfield cells in Pertmaster an ASCII carriage return character is added to the end of each data entry.

prim80481 001 prim80481:Invisible Characters Added To End Of Copied Data


This can cause probelms if using the data for checking purposes such as in VBA code.

Problem: LfCr symbol inserted when copying/pasting activity descriptions. 
Problem: Carriage symbol inserted when copying/pasting activity descriptions. 
Problem: When copying and pasting activity descriptions by using the ‘Copy Cell’ function, a LfCr symbol gets appended to the end of the activity description. 
Fix: Below is some VBA code that can be used to remove any ASCII characters from the end of data in a specified userfield:

Public Sub removeCarriageReturn()
   
    Dim field As String
    Dim t As Task
   
    ‘Get Userfield Name
    field = InputBox(“Enter Name Of Field”, “Enter Field Name”)
       
    ‘For each task check userfield & remove any hidden characters representing ASCII code
    For Each t In ActivePlan.Tasks
        On Error GoTo 0
        If Asc(Right(t.UserFields.UserField(field), 1)) < 33 Then
            t.UserFields.UserField(field) = Left(t.UserFields.UserField(field), Len(t.UserFields.UserField(field)) – 1)
        End If
    Next
   
    End If
   
    ‘Confirm Process Complete
    MsgBox (“Hidden Characters Removed”)


End Sub

Fix: Download the VBA Macro file Remove Invisible Characters From The End Of Data Macro & save to the appropriate macro’s folder being used. This could be “C:\My documents\Pertmaster\Others” or “C:\Program Files\Pertmaster Software\Pertmaster8x\Modules”

To use this macro on a plan go Tools > Macros, locate the RemoveHiddenCharacters.vba macro & run. When prompted enter the userfield that you want to check data & remove characters from. Once finished a message will appear.

Related Posts

Did you enjoy this post?

If so, would you please consider sharing it with the world

Leave a Reply

Default User

Your Name

March 20, 2010

You must be logged in to post a comment.