Imports System.IO Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click If Not File.Exists(TextBox1.Text) Then MsgBox("Soubor neexistuje!", MsgBoxStyle.Critical, "Chyba") Exit Sub End If soubor = TextBox1.Text Me.Hide() Worker.Show() End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click OpenFileDialog1.ShowDialog() TextBox1.Text = OpenFileDialog1.FileName End Sub End Class