INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

removing crlf from clipboard or variable

removing crlf from clipboard or variable

(OP)
I've copied the contents of the clipboard into a variable, and then send that information to the screen in Reflection. However, if there's any crlf characters the screen information displays incorrectly. Since there is no REPLACE command, I've written my own function with the intent of removing these characters if present in the string. But so far all of my attempts have failed. I'm at home now, so I can't copy and paste my function right now, but basically I'm stepping through the variable using FOR I = 1 TO LEN(STRING) (or something like that) and check each character for "<Ctrl+M>" or "<Ctrl+J>" and then don't copy them to a new variable.

This hasn't amounted to anything favorable. I'm looking for some assistance in how I might be able to accomplish this. On Monday I can copy the code here if that would be helpful....

RE: removing crlf from clipboard or variable

Hi,

CODE

Dim s As String
For i = 1 to Len(String)
   Select Case Mid(String, i, 1)
      Case Chr(10), Chr(13)
      Case else
         s = s & Mid(String, i, 1)
   End Select
Next

String = s 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: removing crlf from clipboard or variable

(OP)
Thanks, Skip! I'll give it a try tomorrow!

RE: removing crlf from clipboard or variable

(OP)
Hey, Skip! Just to follow up: I'm up and running successfully! Thanks so much for your expertise!

RE: removing crlf from clipboard or variable

Up and running successfully Is good!

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close