Private Sub button1_Click(sender As Object, e As EventArgs) If openFileDialog1.ShowDialog() = DialogResult.OK Then button1.Enabled = False Dim nfse As New asscshnfse.asscshnfse() nfse.Imprime(openFileDialog1.FileName, String.Empty, 0) button1.Enabled = True End If End Sub