Hi,
i'm new with visual basic.
My problem is the following :
According to the code i have attached,
i use two buttons,
when i press the BUTTON1, opens Browse Folder, i select the drive where i store files and i want to use the path that i have just selected. For this reason i transfer the path to another variable named: PATH
When i use the variable PATH to another function (BUTTON2) it seems like the variable KM has no value. Error message : "Path not found"
How can i use the variable PATH to the other function ?
Hope somebody can help me,
Thank you
-------------------------------------------------------------------------------------
Private Sub BUTTON1_Click()
Dim KM As String
Dim PATH As String
KM = BrowseForFolder (hwnd, "Please select a folder.")
If KM = "" Then
Call MsgBox("The Cancel button was pressed.", vbExclamation)
Else
Call MsgBox("The folder " & KM & " was selected.", vbExclamation)
PATH = KM
End If
End Sub
i'm new with visual basic.
My problem is the following :
According to the code i have attached,
i use two buttons,
when i press the BUTTON1, opens Browse Folder, i select the drive where i store files and i want to use the path that i have just selected. For this reason i transfer the path to another variable named: PATH
When i use the variable PATH to another function (BUTTON2) it seems like the variable KM has no value. Error message : "Path not found"
How can i use the variable PATH to the other function ?
Hope somebody can help me,
Thank you
-------------------------------------------------------------------------------------
Private Sub BUTTON1_Click()
Dim KM As String
Dim PATH As String
KM = BrowseForFolder (hwnd, "Please select a folder.")
If KM = "" Then
Call MsgBox("The Cancel button was pressed.", vbExclamation)
Else
Call MsgBox("The folder " & KM & " was selected.", vbExclamation)
PATH = KM
End If
End Sub
Comment