一个 Textbox1
一个 Commandbotton1
点击 Commandbotton1之后 以Textbox1中的内容为文件名创建一个.txt文件还有
Textbox2
textbox3
commandbotton2
点击 Commandbotton2之后 将textbox2和textbox3的内容写入以Textbox1中的内容为文件名创建的.txt文件中

解决方案 »

  1.   

    Private Sub Command1_Click()
        Open text1.Text For Output As #1
        Print #1, text2.Text
        Print #1, text3.Text
        Close #1
    End Sub
      

  2.   

    只要用下面的就行了,会自动创建这样的文件Open text1.Text For Output As #1
    ...........
    ............
    close #1
      

  3.   

    private sub command1_click()
       open text1.text & ".txt" for output as #1
       close #1end subprivate sub command2_click()
       open text1.text for out put as #1
       print #1 ,text2.text
       print #1,txt3.text
       close #1
    end sub