I am in need of assistance, I have just about pulled out my hair on this one, and don't know what I can do next to make this work.
I am currently writing programs that require very little maintenance, so that I don't have to issue updates... anyway to do this I use a flat file database, which when it works is beautiful, however, I am having issues with my code replicating the same items in the text file... in an attempt to catch the error I found myself in some trouble...
I have attempted to use loops and for...next statements and have got no where.
This is my current code. It crashes so be careful... no errors per say, just never ending loops...
'more fun with file creations:
' I have to open the two files and set them to variables to prevent duplicates...
Dim worker7 As String, worker8 As String, jim3 As Long, jim4 As Long
jim3 = 0
jim4 = 0
Open path0 & "\Phfle.dll" For Input As #10
Do While Not EOF(10)
Line Input #10, worker7
If worker7 = year Then
jim3 = jim3 + 1 ' hopefully this will help create a barrior if jim3 >0 then fail, else, will write to file
End If
MsgBox worker7 & " " & jim3
Loop
Close #10
'create a file for use in opening up certain years and files... this is needed for say we want to look at past years times and placements
If jim3 <= 0 Then
Dim pth As Object
Set pth = CreateObject("scripting.filesystemobject")
If pth.FileExists(path0 & "\Pthfle.dll") Then
Open path0 & "\Pthfle.dll" For Append As #144
Print #144, year
Close #144
Else
Open path0 & "\Pthfle.dll" For Output As #144
Print #144, year
Close #144
End If
End If
'end year path...
Open path0 & "\" & path1 & "\Pthfle.dll" For Input As #11
Do While Not EOF(11)
Line Input #11, worker8
If worker8 = jim2 Then
jim4 = jim4 + 1
End If
MsgBox worker8 & " " & jim4
Loop
Close #11
'create a file for use in opening up certain months and files... this is needed for say we want to look at past years times and placements
If jim4 <= 0 Then
Dim moth As Object
Set moth = CreateObject("scripting.filesystemobject")
If moth.FileExists(path0 & "\" & path1 & "\Pthfle.dll") Then
Open path0 & "\" & path1 & "\Pthfle.dll" For Append As #145
Print #145, jim2
Close #145
Else
Open path0 & "\" & path1 & "\Pthfle.dll" For Output As #145
Print #145, jim2
Close #145
End If
End If
'end month path
The code will not complete the task, the message boxes were to see if it was collecting line inputs from the files that I need to check against. I am almost positive that it is something stupid that I did... Please help me find it... or shoot me ...
Jesse Fender

New Topic/Question
Reply



MultiQuote





|