Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you identify a return character in VBA? 2

Status
Not open for further replies.

tjessejeff

Programmer
Jan 28, 2002
34
US
I am reading an Excel worksheet into an ACCESS database. I have return values that show up at the end of a lot of the fields. Some of the cells imported have the same values except a few have return codes on the end. This is hurting my sort routines. The fields that have return codes will have a box as the last character. How do I identify a return code in VBA so I can strip them out?
 
If you are running the procedure in XL then try this:

WorksheetFunction.Clean("Text")


Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Sheesh Mike! I can only repeat my question in thread707-644008 - Where do you guys pick this stuff up??

Who would've thought of "WorksheetFunction.Clean" without trying to code their own UDF?

Most folks I know read thrillers or horror books, but you lot must take the Excel User Guide to bed/bath/pub with you!
And us mere mortals must bow down and give grateful thanks that you do! [wink]

TVM for teaching me yet another one of those "WOW!" facts about XL.

Chris
 
Thanks alot Mike. I wiil try this a soon as I get home tonight.


Thanks!

Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top