Funny characters in text

Hi

I use the following code to insert lines of address text into an excel 
sheet.

Dim MyXL As Object

Set MyXL = GetObject("C:\My Spreadsheet.xls")

MyXL.WorkSheets("Sheet1").Range("C7").Value = Me.Client & vbCrLf & 
Me.[Client Address]

The problem is that on a client's pc the address shows funny boxes in 
spreadsheet between address lines, I presume these are CRLF characters. 
However on my PC I don't see them. Even when they send me a spreadsheet 
which I can see by remotely login in has boxes, does not show boxes at my 
end. What is the problem and how can it be fixed?

Thanks

Regards 


0
John
9/6/2007 8:08:17 PM
access 16762 articles. 3 followers. Follow

1 Replies
738 Views

Similar Articles

[PageSpeed] 57

ACCESS uses the carriage return + line feed characters (in combination) to 
denote a new line. EXCEL uses just the line feed character to start a new 
line. EXCEL doesn't see the carriage return + line feed characters (in 
combination) as a "valid" new line, so you see the square box to represent 
them. Therefore, change your code line to this:

MyXL.WorkSheets("Sheet1").Range("C7").Value = Me.Client & vbLf &
Me.[Client Address]

-- 

        Ken Snell
<MS ACCESS MVP>


"John" <John@nospam.infovis.co.uk> wrote in message 
news:ORAlrGM8HHA.1484@TK2MSFTNGP06.phx.gbl...
> Hi
>
> I use the following code to insert lines of address text into an excel 
> sheet.
>
> Dim MyXL As Object
>
> Set MyXL = GetObject("C:\My Spreadsheet.xls")
>
> MyXL.WorkSheets("Sheet1").Range("C7").Value = Me.Client & vbCrLf & 
> Me.[Client Address]
>
> The problem is that on a client's pc the address shows funny boxes in 
> spreadsheet between address lines, I presume these are CRLF characters. 
> However on my PC I don't see them. Even when they send me a spreadsheet 
> which I can see by remotely login in has boxes, does not show boxes at my 
> end. What is the problem and how can it be fixed?
>
> Thanks
>
> Regards
> 


0
Ken
9/6/2007 9:46:19 PM
Reply:

Similar Artilces:

Highlight text via macro
I am a novice writing a Word macro where I wish to highlight a selection of words in a document. These pre-defined words are listed in a table in a second Word document. I have taken and attempted to modify my macro from an earlier posting on this forum. It fails with the message “Named argument not found” on the statement ‘HighlightColorIndex:=wdBrightGreen’. The code is: Sub Highlighting() Dim TableDoc As Document ' The document that contains the table Dim RefDoc As Document ' The document that is being referenced (highlighted) Dim cTable As Table Dim oFind As...

custom CStatic and text wrapping
I have almost finished to developp a nice CStatic derived control thanks to all examples on codeproject and codeguru. I took what was the most interesting (flicker_free, handling of transparency, color, blink, pictures, email link, ...) from every control I found but my last problem is about text wrapping. I have tried to use DT_WORDBREAK with DrawText but with no success. Finally someone on code project proprosed a solution but it is not perfect. If you are curious you can see the problem here : http://richom.v.free.fr/ Text wrapping is my last problem. If someone could find a solution. ...

Removing characters from cell
Hope someone can help me with this one.... I have text in column "A" a list of parts like the following..... ...nhg1234 ..nhg1235.54 nhg3456 ....nhg1253.7 Is thier anyway of removing the dots in front the part number? I dont want the points moving after the the main part of the number. Please help TiA mag()() Do you part numbers all start with nhg? If yes, you could select column A edit|Replace what: .n with: n replace all And keep hitting the replace all button until all are fixed. "Mag()()" wrote: > > Hope someone can help me with this one.... >...

Importing into Excel from a Text file
We have a text database of about 7,000 rings. It is in a fixed format. Unfortunately some where we have about 4 or five rings whose format is screwed up. We figured by importing to Excel, we should be able to find where the records are to fix them. But, we just can't get the following format to import into excel. If anyone can help us, we sure would appreciate it! Thank you Greg Gates www.ringdesigner.com Each record begins with Begin Product Each record endswith EndProduct a semicolin seperates each record Also there are para symbols at the end of every line Herer are a...

FIND a character
Hello All, I want to find a character in an entry in Excel and assign a value in another entry depending on if the character is found or not. For example, I am trying to use IF(FIND("m",F3)=#VALUE!,0,B3) to give me a value 0 if the logical test in the IF function is TRUE. Otherwise, return the value in B3. The problem is if "m" is not found, FIND returns the #VALUE! error value, and I have no idea on how to test for this condition. Any ideas? Does anyone have another suggestion on how to accomplish what I am trying to do? Thank you. =IF(ISNUMBER(FIND("m&q...

Rotating a text box
Does anyone know how to rotate a text box in Excel2002? I want my chart annotations to align with the plotted data. I've tried everything I can think of, but when formatting the text box, the rotate option on the "size" tab is always greyed out. I would use WordArt instead, but there's no plain text option with it, just silly looking decorative text. Any ideas? Thanks, Jim Bready Jim Bready wrote: > Does anyone know how to rotate a text box in Excel2002? I want my > chart annotations to align with the plotted data. I've tried > everything I can think...

Curve the Text Box in a Newsletter?
Is there a way to curve the text box justification? There are severa templates within Publisher that have curved color "blocks" that ru along the left or right border of the newsletter. I am able t insert a text box, but am unable to justify it along the curve of th color block Any ideas would be greatly appreciated Thanks. Lewiedude This is a wrap issue, bring the "color blocks" to the front. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "lewiedude" <mlewensohn@comcast-dot-net.no-spam.invalid&g...

Text from Dreamweaver not pasting correctly
Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I pasting text from Dreamweaver as their spell check does not work too well. but it's not landing in the page. what is this? thanks: <br><br><a href="http://tinypic.com/r/2vwwll4/6">http://tinypic.com/r/2vwwll4/6</a> Hello, On 2010.01.21 4:17, in article 59bb1512.-1@webcrossing.JaKIaxP2ac0, "kevs12@officeformac.com" <kevs12@officeformac.com> wrote: > Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel > I pasting text...

Count Nonblank Text Cells
Hello. I searched for a solution to this, but couldn't quite find what I needed. I am importing data into five columns in Excel. Each of the cells is formatted as text, but most of them are blank. I want a count of the ones that are not blank. I have five columns for problem codes, so each row will have between zero and five problem codes. This is a little trickier than I thought because the problem codes can be either numbers or letters or a combination of both. How do I write a formula that says, "Look in these five cells and tell me how many of them have something meaningful...

Conditionally Converting Text to Numbers in VBA
Our database program exports a column of data as text. This column includes general text (e.g. Summer), numbers (2002), and dates (AUG 03). If I were using excel formulas, I'd simply do the following =if(iserr($b2+0),$b2,$b2+0) and copy the formula down. Excel then happily converts dates and numbers and I can use these thereafter. How can I do the same in VBA, but referencing by cell rather than range? (I'm looping down using a numeric row counter, =cells(rowcounter, 2) ) Any help would be appreciated. Thanks -- Jon ----------------------------------------------------------...

text numbers as dates via OCR import
Here is a tough one... I have OCR scanned a printout from a database that contains sales information. The key column of data is the Product number which is in the format of nn-nn-nnnn. Of course upon import into Excel, it treats some (but oddly enough not all) of these entries as dates in the format mm/dd/yyyy. I had formated the sheet as Text prior to import. There seems to be no way now to properly sort this data as I get the "mixed numbers and text" box during a sort operation and of course it sorts in that order. I have tried several formulas, macros and formatting st...

Setting every text object in a detail line to bold.
I want to set all the text objects in the detail line to bold depending on a condition of one of those objects. For example, If txtExpired.Text <> "Current" Then txtExpired.FontBold = 1 : txtName.FontBold = 1 'etc. Else: txtExpired.FontBold = 0 : txtName.FontBold = 1 'etc. End If My question: Is there a syntax, of the form "For all objects in detail" that allows me to bold every text box in the detail line without setting each FontBold to 1 individually? If this is a Continuous form or datasheet, setting the properties like tha...

Outlook 2002 XP: Borders & Shading Task Text
Does anyone know if there is a way natively (or third party utility) to shade text with colors in Outlook Tasks items? I've been struggling for months now to do this, searched the web, slipstick systems searches, etc - no luck. Shade text where, exactly? In the Task List or in the Task item itself? -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** "Billy" wrote: > Does anyone know if there is a way natively (or third party utility) to > shade...

Outlook 2003 Messages and Calendar Appts Received as PLAIN TEXT
SGVsbG86DQoNCkkganVzdCBnb3QgYSBuZXcgbGFwdG9wIHdpdGggVmlzdGEgSG9tZSBCYXNpYyBv biBpdCBhbmQgSSBjb3BpZWQgbXkNCnBzdCBmaWxlIGZyb20gbXkgb2xkIGxhcHRvcCB0byB0aGUg bmV3IG9uZS4gRXZlcnl0aGluZyB3b3JrcyBmaW5lDQpleGNlcHQgYWxsIGUtbWFpbCBtZXNzYWdl cyBhbmQgY2FsZW5kYXIgYXBwdHMuIEkgcmVjZWl2ZWQgYXJlIGluIHBsYWluDQp0ZXh0LiBJJ3Zl IHNlYXJjaGVkIGV2ZXJ5d2hlcmUgZm9yIHRoaXMgZml4LCBidXQgZm91bmQgbm90aGluZy4gDQoN CkRvZXMgYW55b25lIGhhdmUgYW55IHN1Z2dlc3Rpb25zIGZvciBtZT8gDQoNClRoYW5rIHlvdSEN ClNwdWRkeQ0K me@cox.net <me@cox.net> wrote: > I just got a new laptop with Vista Home Basic on it and I copied my > pst file...

HOW DO i SET DEFAULT TEXT BOXES IN PUBLISHER
I have found MVP who created the toolbar for this, but the page will not allow me to download the toolbar. Any suggestions?? What is the URL? I can't remember a toolbar. When you are finished modifying the normal.pub and you save as: C:\Documents and Settings\User Name\Application Data\Microsoft\Office\normal.pub, in the save as dialogue, click tools on the right top, click add to "My Places." It will quickly be available. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com http://officebeta.iponet.net/en-us/publisher/F...

Text size on check boxes
Hi all: Is there any way to increase the text size on check boxes? Thanks in advance. FC I forgot to mention, Increasing the font on group boxes will be nice too. Thanks. ...

formatting text as active hyperlinks
I have tried to format cells containing valid urls as hyperlinks. I can copy the format from a valid and active hyperlink; but when I paste it in the cell (I have tried pasting format), the contents look like a hyperlink, but the mouse cursor does not change when I hover over it, and I can't open the web site by clicking on it? Any ideas? -- dpimental ------------------------------------------------------------------------ dpimental's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=14848 View this thread: http://www.excelforum.com/showthread.php?threadid=26...

Remarks field character size
I have been looking at changing the caracter size of the Remarks field on the PO. I have been getting some feed back that I shouldn't do that because its going to make the database unstable. The current size of the Remarks field is set to 30 characters and it just don't cut it for the PO. If we have to add a special instruction we can't. Does any one know anything about the stability issue or how to increase the character size? Regards, -- Microsoft Partner Don't they explain this stuff when you become a "Microsoft Partner"? "Yaniv Zahavi" &l...

Highlight specific text
How do I highlight specific text within a cell in Excel 2003 in all rows? -- jlr Please disregard. -- jlr "jlr" wrote: > How do I highlight specific text within a cell in Excel 2003 in all rows? > -- > jlr ...

Append Text to Cell Values Using Replace
Hi, I've tried to search all the posts to see if anyone has run across this before but couldn't find one. So here goes my question :-) I'd like to be able to append some additional string (let's say "Hello ") to the contents of a range of cells, regardless of what they were. For EX, if a cell was "Linda", now it is "Hello Linda" etc. What I've done in the past is to put a formular in the next cell (let's say B1) that says ="Hello " & A1. That works but it's becoming quite time consuming after a while. I'd like ...

Error for Textbox text
I have developed a Report in Reporting Service. I have text box taken on Report. In that text box's Expression section i have following hardcoded text like : = "NOTE: �Senior Officers� for the purpose" While compiling this report it gives me error like [rsCompilerErrorInExpression] The Value expression for the textbox �textbox1� contains an error: [BC30205] End of statement expected Plz suggest the solution From http://www.developmentnow.com/g/115_2006_8_0_2_0/sql-server-reporting-services.htm Posted via DevelopmentNow.com Groups http://www.developmentnow.com/g/...

Format in an unbound Text Box
Hi all, I have a form that I have put an unbound text box in, which displays the previous entries from my table. One of my fields is Current Time. Which on my form I set to Short Date (military time). How can I have my unbound text display Short time as well. here is my code (control source of my unbound text box). SELECT DISTINCTROW tblSITLog.[current time], tblSITLog.MONTH, tblSITLog.DAY, tblSITLog.SIT, tblSITLog.[NATURE OF iNCIDENT], tblSITLog.[Case Description], tblSITLog.Incident_Number FROM tblSITLog WHERE (((tblSITLog.[NATURE OF iNCIDENT])="CHRONO ENTRY")) ORDER BY...

Line spacing in text boxes for web pages
For some reason, the text formatting menu in the web page project area doesn't have an option for changing the line spacing from double-spaced. I want the text on my web pages to be single spaced. In all the other projects, you can use the text formatting menu to change the line spacing but I don't see that anywhere on my web page project. Surely, web pages don't *have* to be double- spaced? They *don't* have to be anything. Have you read the HELP file? How *would* we know when *you* don't tell us what version of Publisher you are using!!! Pity you *don't* hav...

Displaying text into Sql reports
I would like to know what I can use in sql server report 2008 to display several sentences or paragraphs prior to where I have a table generated. Each table in each report will display the data. To display the paragraph(s) and/or sentence(s) before the table containing data what toolbox item would I use? Should I use a matrix, rectangle, textbox, and or another table? Not sure if i completely understand your request: Are you simply wanting to insert a paragraph before your data table or matrix?, then just use a textbox, thereafter you can do your tables or matrix. These text ...

how to converts a number to text eg. "2" become "two" #2
http://support.microsoft.com/default.aspx?scid=kb;en-us;213360 many excel utilities from third parties have this built in http://xcell05.free.fr/ Morefunc for instance, see above link -- Regards, Peo Sjoblom Northwest Excel Solutions Portland, Oregon "CQ" <CQ@discussions.microsoft.com> wrote in message news:03EC3E12-2919-4F4F-9D6B-101F7C095860@microsoft.com... > ...