VB 未声明"Open"."Microsoft.VisualB

2020-04-17  本文已影响0人  自渡独自

错误提示

错误原因

open是vb6.0的语法,VB2013没有open所以报错

Dimname AsString= ""

        Dimage AsInteger

        name = InputBox("请输入姓名")

        age = InputBox("请输入年龄")

        FileOpen(1, "d:\信息.txt", OpenMode.Append)

        WriteLine(1, name, age)

        FileClose(1)

 FileOpen(1, "d:\信息.txt", OpenMode.Input)

        Dimh AsString

        Dimj AsString

        Dimf AsString

        f = ""

        h = ""

        j = ""

        WhileEOF(1) = False

            f = LineInput(1) & vbCrLf & f

        EndWhile

        FileClose(1)

        MsgBox("姓名"& "  "& "年龄"& vbCrLf & f)

上一篇 下一篇

猜你喜欢

热点阅读