Delete Asc(10) character from cell

  • Thread starter Thread starter Rocky McKinley
  • Start date Start date
R

Rocky McKinley

I have cells with Asc(10) characters in them, however when I press the
Delete key or Clear Contents or make the cell = "" the character still
remains in the cell. How can I rid myself of the character using code? I
can get rid of it manually by selecting the cell, clicking in the formula
bar and back spacing.
Any ideas would be appreciated, thanks.
 
Hi
maybe something like
range("A1").value=Replace(range("A1").value, chr(10),"")
 
I used the code below to check the cell in question and the message box came
up with 10 as the only answer.

Sub CheckCellValue()
Dim a as Integer
For a = 1 To 255
If Chr(a) = Range("AE16").Text Then MsgBox a
Next a
End Sub

I'll check out Chip's page as you suggested, thanks.
 
Chips Add-In comfirms as my code below did that the Decimal character is
010. It really doesn't matter what character it is as long as I can get rid
of it, that is the main problem. I'm sure someone must have ran into this
one before!

Any help is still appreciated.
 
ActiveCell.Clearcontents

does exactly that - Asc(10) is not ignored.

You probably didn't apply it to the cell in question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top