Dim dlg As New OpenFileDialog() dlg.Filter = "Excel Macro Enabled Files|*.xlsm*|Excel Files|*.xls|Excel 2007 Files|*.xlsx|All Files|*.*" If dlg.ShowDialog() = DialogResult.OK Then ' excelObj = New ExcelObject(dlg.FileName) txtFilePath.Text = dlg.FileName Me.ExcelWriteBtn.Enabled = txtFilePath.Text.Length > 0 Me.closexlsbtn.Enabled = txtFilePath.Text.Length > 0 Else messagebox.show("Please Select a File") dlg.showdialog() End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)