you could use something like this:

vb Code:
  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.         'browse for folder
  5.         Dim fbd As New FolderBrowserDialog
  6.         If fbd.ShowDialog = Windows.Forms.DialogResult.OK Then
  7.             TextBox1.Text = fbd.SelectedPath
  8.         End If
  9.     End Sub
  10.  
  11.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  12.         If IO.Directory.Exists(TextBox1.Text) Then
  13.             'button1 has already been clicked
  14.             'your code here
  15.         Else
  16.             MessageBox.Show("Please select a folder first", My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly, False)
  17.         End If
  18.     End Sub
  19.  
  20. End Class