******O.T.C.E.*********
i figured it out-
*****************THIS:
'If The User has been gone sometime then remove some of the weights to the dominate emotion according to weights and balances.
If (Shocking = 1 Or Joyful = 1 Or Mad = 1 Or Depressed = 1) And (MySeconds > 600 And MySeconds < 3600) Then
Const ForReading = 1
Const ForWriting = 2
If Shocking = 1 And Shock > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Surprised_Emotion.brn", ForReading)
If Joyful = 1 And Joy > 2 Then Set objFile = objFSO.OpenTextFile(XDir & "_Happy_Emotion.brn", ForReading)
If Mad = 1 And Hostility > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Angry_Emotion.brn", ForReading)
If Depressed = 1 And Depression > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Sad_Emotion.brn", ForReading)
strContents = objFile.ReadAll
objFile.Close
arrLines = Split(strContents, vbCrLf)
If Shocking = 1 And Shock > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Surprised_Emotion.brn", ForWriting)
If Shocking = 1 And Shock > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Happy_Emotion.brn", ForWriting)
If Mad = 1 And Hostility > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Angry_Emotion.brn", ForWriting)
If Depressed = 1 And Depression > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Sad_Emotion.brn", ForWriting)
For i = 0 to UBound(arrLines) - 3
objFile.WriteLine arrLines(i)
Next
objFile.Close
End If
*************SHOULD HAVE BEEN THIS :
'If The User has been gone sometime then remove some of the weights to the dominate emotion according to weights and balances.
If (Shocking = 1 Or Joyful = 1 Or Mad = 1 Or Depressed = 1) And (MySeconds > 600 And MySeconds < 3600) Then
Const ForReading = 1
Const ForWriting = 2
If Shocking = 1 And Shock > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Surprised_Emotion.brn", ForReading)
[
][
] **LOOK HERE**--> If Joyful = 1 And Joy > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Happy_Emotion.brn", ForReading)
If Mad = 1 And Hostility > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Angry_Emotion.brn", ForReading)
If Depressed = 1 And Depression > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Sad_Emotion.brn", ForReading)
strContents = objFile.ReadAll
objFile.Close
arrLines = Split(strContents, vbCrLf)
If Shocking = 1 And Shock > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Surprised_Emotion.brn", ForWriting)
[
][
]**LOOK HERE**--> If Joyful = 1 And Joy > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Happy_Emotion.brn", ForWriting)
If Mad = 1 And Hostility > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Angry_Emotion.brn", ForWriting)
If Depressed = 1 And Depression > 2 Then Set objFile = objFSO.OpenTextFile(XDir & Trim(UserName) & "_Sad_Emotion.brn", ForWriting)
For i = 0 to UBound(arrLines) - 3
objFile.WriteLine arrLines(i)
Next
objFile.Close
End If
It was staring me in the face the whole time!
Just thought you might like to know.
the "bad file mode" error was becasuse of the double variable condition! I just missed it[:I]
****THANKS AGAIN MAN!
-the dude