Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > File I/O and Registry > Tabbing In File


Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2003, 01:51 AM
SesshoumaruSama SesshoumaruSama is offline
Newcomer
 
Join Date: Aug 2003
Posts: 19
Cool Tabbing In File


How would u Print a Tab space...?

Print #1, Data & "TAB";

Help would be very much appreciated... Thanks
Reply With Quote
  #2  
Old 10-19-2003, 02:24 AM
zanth_quareni's Avatar
zanth_quareni zanth_quareni is offline
Senior Contributor
 
Join Date: Aug 2003
Location: Tomarria
Posts: 905
Default

Hmm if it is tha same as the way you do it with Printer.Print, you just add tab(Number) where Number is the column you want to start at.

If not, you can write a little function to tab a certain number of spaces...
Code:
Function Space(num as integer) as string dim i as integer for i = 0 to (num - 1) 'loops for the amount of spaces you specified Space = Space & " " 'adds a space next i end function

or something that starts writing at a specific column. it just adds to the string a number of spaces until it reaches the number specified.
Code:
Function AddTab(column As Integer, lineToTab As String) As String Do While Len(lineToTab) < column lineToTab = lineToTab & " " Loop AddTab = lineToTab End Function

gurus/experts/others-that-know please correct me or give shorter methods...
__________________
...leben ohne sinn...
Reply With Quote
  #3  
Old 10-19-2003, 02:48 AM
SesshoumaruSama SesshoumaruSama is offline
Newcomer
 
Join Date: Aug 2003
Posts: 19
Default ...

I don't want to add spaces because i want excel to read the text file, so spaces don't work. And also, I'm printing under a timer so I don't think do and while loops will work. Thanks for your help though, I'll try it out and see how it goes... Thx...
Reply With Quote
  #4  
Old 10-19-2003, 03:24 PM
Flyguy's Avatar
Flyguy Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 18,931
Default

Just use vbTab:
Code:
sLine = "Item1" & vbTab & "Item2" & vbTab & "Item3"
Reply With Quote
  #5  
Old 10-20-2003, 07:12 AM
SesshoumaruSama SesshoumaruSama is offline
Newcomer
 
Join Date: Aug 2003
Posts: 19
Default

Thanks heaps...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Problem - PLs help urgenlty dpdsouza Installation / Documentation 4 12-02-2004 07:09 PM
File Problems: Files Not Closing etc. Templeton Peck General 5 03-29-2003 11:34 PM
Doesn't want to register! MikeyM Installation / Documentation 5 03-02-2003 08:22 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->