LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Comment and Tab character

I am placing into a cell comment the Text value from a file. (it happens to
be some short SQL program statements)

In the *.SQL file tab chars CHR(9) have been stored so that when viewing the
file in Notepad the Table/field names line up nicely. How do I make this
happen when the text is placed into a comment.

Range(sCell).Comment.Text Text:=sSQLtext
sSQLtext is read in with OpenTextFile and a .ReadAll

I have the comment shape resizing automatically but I am getting unprintable
characters showing as a box. CHR(10) works properly to line break. But 9s
and 13s are showing as the unprintable default box-character. I figure I can
just relpace the 13's with a space CHR(32).. but for the 9's that will change
the appearance of the text.

Is there a setting that will make the CHR(9) actually tab to a position with
in the comment text box?

I was hoping to not have to use the "brute-force" method and process the
text character by character storing when a new line starts and count the
characters to know exactly how many spaces to replace the CHR(9) with.
--
Regards,
John
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Formatting text in cell (character by character) TomC Excel Discussion (Misc queries) 0 January 29th 10 07:25 PM
importing undelimited text file data, character-by-character The Mos$ Excel Programming 4 December 26th 05 11:01 AM
What are the character codes of a carriage return entered in a comment? John Wirt[_11_] Excel Programming 4 July 29th 05 06:05 AM
Function to return Character Position of Xth character within a string Andibevan[_2_] Excel Programming 4 June 9th 05 03:24 PM
a comment plugin & copy paste directly from excel to comment ? fr. RFM Excel Worksheet Functions 0 December 1st 04 11:29 PM


All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"