473,472 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help with my code please!! need it for tommorrow

2 New Member
Dim fileToCopy, NewCopy, txtFiles, inpFiles As String
Dim sr As New StringReader(TextBox3.Text)

fileToCopy = ("c:\" + inpFiles + ".txt")
NewCopy = ("C:\jj.txt")

sr = New System.IO.StringReader(TextBox3.Text)
inpFiles = sr.ReadLine()
Do
txtFiles += inpFiles & CrLf
inpFiles = sr.ReadLine()
MsgBox(inpFiles)

If System.IO.File.Exists(fileToCopy) = True Then
System.IO.File.Copy(fileToCopy, NewCopy)
MsgBox("We are Done You Have Won")
End If


Loop Until inpFiles = Nothing
sr.Close()

for some reason the stringreader will not read the line of input from the textbox.

what have i done Wrong????


thanks
Mar 30 '08 #1
1 961
jg007
283 Contributor
Dim fileToCopy, NewCopy, txtFiles, inpFiles As String
Dim sr As New StringReader(TextBox3.Text)

fileToCopy = ("c:\" + inpFiles + ".txt")
NewCopy = ("C:\jj.txt")

sr = New System.IO.StringReader(TextBox3.Text)
inpFiles = sr.ReadLine()
Do
txtFiles += inpFiles & CrLf
inpFiles = sr.ReadLine()
MsgBox(inpFiles)

If System.IO.File.Exists(fileToCopy) = True Then
System.IO.File.Copy(fileToCopy, NewCopy)
MsgBox("We are Done You Have Won")
End If


Loop Until inpFiles = Nothing
sr.Close()

for some reason the stringreader will not read the line of input from the textbox.

what have i done Wrong????


thanks
I am fairly new to VB coding but i'm not sure if you are using stringreader correctly as does not look quite right, what do you expect this code to do?

also at least when I read it as you have posted it you are using inpfiles before assigning it any text when you use "fileToCopy = ("c:\" + inpFiles + ".txt")"
Mar 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mike | last post by:
Hey guys I am pulling my hair out on this problem!!!!! Any help or ideas or comments on how to make this work I would be grateful! I have been working on this for the past 4 days and nothing I do...
4
by: Joseph | last post by:
The idea is to show only one of the <Baby_Div> while hiding all the others. At the moment all I have managed to do is to show each <Baby_Div> in turn as expected, but the problem is that once a...
7
by: Mickyd1561 | last post by:
Hey everyone I'm new to this groups thing and thought maybe someone can help me. My problem is that I can't view specific images on only one website. www.baseballu.net is my baseball team's...
0
by: karizmatrix22 | last post by:
I using Microsoft ASP.NET web matrix program to create asp website..i would like to link a image to the another page.for example..when the user click on the image it should take user to the next...
3
hirak1984
by: hirak1984 | last post by:
When i am calling this class from another class only a blank frame appears,with nothing on it.I dont know where the problem is,Please help. class project extends JFrame{ public void project() {...
2
by: Dalton | last post by:
This is all kind of in another language to, I mean I understand most of the words in relation to programming, but my field of work/study is IT. Anyways, on to the problem. I am working on my 5th...
0
by: rempit | last post by:
Is it true???Help me please.. I want to search data from Database..And..The result is view in new "DIV".. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="new.aspx.vb"...
2
by: Ecot | last post by:
Hi all, I have not got any php knowledge and I have found a php code on the net and using it to send e-mail from a web html form.So far the form and the code works fine. I have the following php...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.