我宣告了一個字串Dir在form2中給予他一個值,想在form1中使用,該如何做呢?
Form1:
___________________________
Dim Dir As String
Public Sub Command1_Click()
Kill Dir
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Form2.Show
Form1.Hide
End Sub
Private Sub Form_Load()
Form2.Show
Form1.Hide
End Sub
---------------------------
Form2:
___________________________Dim Dir As String
Public Sub Command1_Click()
Dir = Dir1.Path & "\*.*"
Unload Form2
Form1.Show
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Form_Load()
First = fa
Drive1.Drive = "e:"
Dir1.Path = "e:\documents and settings\"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Show
End Sub