If Dir("8.txt") <> "" Then Dim temp8 As String Open App.Path & "\8.txt" For Input As #8 Line Input #8, temp8 Val (Text5.Text) * 145636 = temp8 Close #8 End If“Val (Text5.Text) * 145636 = temp8” 这一句不能颠倒过来
应该用Print保存,而Line Input 是读取一行: If Dir("8.txt") <> "" Then Dim temp8 As String Open App.Path & "\8.txt" For Input As #8 Print #8, cLng(Text5.Text)*145636 'Val (Text5.Text) * 145636 = temp8 Close #8 End If
If Dir("8.txt") <> "" Then Dim temp8 As String temp8 = Val (Text5.Text) * 145636 Open App.Path & "\8.txt" For Output As #8 Print #8, temp8 Close #8 End If
Dim temp8 As String
Open App.Path & "\8.txt" For Input As #8
Line Input #8, temp8
Val (Text5.Text) * 145636 = temp8
Close #8
End If“Val (Text5.Text) * 145636 = temp8”
这一句不能颠倒过来
If Dir("8.txt") <> "" Then
Dim temp8 As String
Open App.Path & "\8.txt" For Input As #8
Print #8, cLng(Text5.Text)*145636
'Val (Text5.Text) * 145636 = temp8
Close #8
End If
text5.text=temp8
text5.text=val(text5.text)*145636
'你想要的是以上这个?
Dim temp8 As String
temp8 = Val (Text5.Text) * 145636
Open App.Path & "\8.txt" For Output As #8
Print #8, temp8
Close #8
End If