SunQuest
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old November 3rd, 2003, 09:18 AM
jwolfe jwolfe is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 38 jwolfe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Not write carriage return when writting to a file

I am having difficulty preventing VB from writting carriage returns to a file. I accept multiple input values from the screen and write to a file, but it appends a carriage return during the write so I can't use the remove(string, vbCrLf) from the variable. Is there any way to write multiple variables to a file without appending the x'0d' for the carriage return? Thanks.

Reply With Quote
  #2  
Old November 3rd, 2003, 04:09 PM
crackerweb crackerweb is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 786 crackerweb User rank is Private First Class (20 - 50 Reputation Level)crackerweb User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 18 h 16 m
Reputation Power: 6
when writing a file are you using a text box with multiline set to true?

Reply With Quote
  #3  
Old November 3rd, 2003, 10:44 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
U can use vb filesystem object..
1.add the reference of the MS Script Runtime to your project.
2.put this code in your program:
sub writelines2file(filename as string,filecontent as string)
dim fso as new filesystemobject
dim txt as textstream

txt=fso.createtextfile(filename,true)
txt.write filecontent
txt.close

set txt=nothing
set fso=nothing
end sub

To see more information:
http://msdn.microsoft.com/library/d...ofilesystem.asp

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Not write carriage return when writting to a file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway