美文网首页
VB 未声明"Open"."Microsoft.VisualB

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

作者: 自渡独自 | 来源:发表于2020-04-17 17:05 被阅读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)

相关文章

网友评论

      本文标题:VB 未声明"Open"."Microsoft.VisualB

      本文链接:https://www.haomeiwen.com/subject/somyvhtx.html