Hello,
My question is about reading an Apostrophe/Single Quote to a cell.
My program reads a text file a single character at a time. And many lines of the text I'm reading begin with a single quote.
Unlike double quotes and other characters, single quotes aren't showing up in cells when they are read in first. They show up only in the function box. This is a huge problem for my program.
The following code produces the correct results:
If Character = "A" Then
ActiveSheet.Cells(1,1).Value = ActiveSheet.Cells(1,1).Value + Character
This correctly writes the letter A to the first cell.
However, the following code:
If Character = (Chr$(39)) Then
ActiveSheet.Cells(1,1).Value = ActiveSheet.Cells(1,1).Value + Character
... Doesn't write the single quote to the cell when it's the first character in the cell. It only writes the single quote to the function box. This is a huge problem because when i try to append the next character to the value of the cell holding the single quote, the single quote is entirely omitted and it never appears in the result.
Is there a workaround for this? How can I write a single quote to a cell and have it appear there when the next character is appended to it?
Thanks for any and all help.
Bookmarks