打开VBA编辑器, 插入一个用户窗体, 在窗体中放一个textbox, 一个commandbutton, 然后打开窗体代码窗口粘贴以下代码 Private Sub CommandButton1_Click()'读入一个ANSI编码的文本文件,并显示在textbox中On Error GoTo errhandipath = ThisWorkbook.Path & "\test.txt"Open ipath For Input As #1TextBox1.MultiLine = TrueTextBox1.Value = StrConv(InputB(LOF(1), 1), vbUnicode)Close #1Exit... |