谢谢各位,我用下面的方法办到了。
Private Sub Command1_Click()
Label2.Caption = Text1.Text
Dim fso, txtfile
Set fso = CreateObject("scripting.filesystemobject")
Set txtfile = fso.CreateTextFile("d:\dlsfxt\lj.txt", True)
txtfile.Write (Text1.Text)
txtfile.writeblanklines (3)
txtfile.Close
End Sub
Private Sub Form_Load()
Open "d:\dlsfxt\lj.txt" For Input As #1
Input #1, p$
Label2.Caption = p$
Close #1
但是有没有更好的办法呢?
比如直接写入label1的caption 属性值。