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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASCII Character - Tab Between Table Columns

Status
Not open for further replies.

bernie321

Programmer
Jan 7, 2004
477
GB
Hi

We have a system that inserts text into a document from our SQL Server database.

We cannot edit the VBA code for warrenty/support reasons.

We use ASCII chars to add tabs and line breaks but I cannot find the approprate charactor to tab between colums in a table. E.g. SELECT '1' + CHAR(13) + '2'

What code should we use or is there a workaround?

Any help would be much appreciated
Thanks
B
 
The Tab character is Chr(9)
Carriage Reteurn is Chr(13)
Line Feed is Chr(10)

New Line on Windows/DOS systems is Chr(13) + Chr(10), on Unix systems (I think is just Line Feed)

Hope this helps.
 
Hi

Sorry I forgot to mention that I have tried CHAR(9), this just puts a non-printable character in the table.

Thanks B
 
Hi Bernie,

I don't think you can do it. But I'm not quite sure what you are attempting. There isn't a 'data-stream' (non-VBA, non-GUI) method to add text so how are you identifying places in your document to add whatever you add? How, for example, are you adding any text in your table at all?



Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top