Hi all ,
first of Merry Christmas to you all and i hope all your wishes come true
i have a problem with the code below, it was designed to compaare two text files and then write the differences in another text file
it all works but then gives me an error in my 'ComparTextFiles Sub' on the line 'Current.Value = Current.Value + Len(CurrentLine)' and i have no idea why please could someone share there ideas or opinions of this code
listed below is the code i use including the code i use to call this sub
Private Sub Command1_Click()
CompareTextFiles "" & Text1 & "", "" & Text2 & "", "" & Text3 & ""
Private Sub CompareTextFiles(Fileone As String, Filetwo As String, Output As String)
Open Fileone For Input As #1
Fileonelen = LOF(1)
FileoneRead = Input(Fileonelen, #1)
Open Filetwo For Input As #2
Open Output For Output As #3
Do While Not EOF(2)
Line Input #2, CurrentLine
Current.Value = Current.Value + Len(CurrentLine)
If InStr(1, UCase(FileoneRead), UCase(CurrentLine)) Then
MsgBox "No Differences Were Found", 0, "EMIS PCC"
'difference found, write it to the output file
Print #3, CurrentLine
MsgBox "Some Differences Were Found, Please Refer To Outputed File For More Information", 0, "EMIS PCC"
many thanks for all your help, always greatly appreciated
Because you have not shown any Variable Dimensioning, the obvious answer is in the 'Current.Value' which I would guess should be 'CurrentValue'.
There are other things within the code which do not make sense unless they are dimensioned elsewhere.
Merry Christmas to you as well.
Rob: What is the error message?
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Merry christmas mate
the actual error message is Run Time error 424 Object required it then highlights the following line of my code
'Current.Value = Current.Value + Len(CurrentLine)'
thanks in advance
By Hutty in forum ASP.NET
Last Post: 09-27-2005, 05:11 PM
Last Post: 01-26-2002, 05:49 AM
Last Post: 08-30-2001, 12:45 PM
By George Gilbert in forum vb.announcements
Last Post: 08-19-2001, 12:34 PM
By Larry Rebich in forum VB Classic
Last Post: 12-15-2000, 11:29 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL