Б. чистые открытия списка без формы
привет френды
могу ли я открыть msgbox, как listbox?
поэтому я выбираю значение в списке.
Что я уже пробовал:
Sub exceldenal2() Dim fd As OpenFileDialog = New OpenFileDialog() Dim yol As String Dim sayfa fd.Title = "Open File Dialog" ' fd.InitialDirectory = "H:\COST ACCTG\Inventory\" fd.Filter = "Excel 2003 Dosyaları (*.xls*)|*.*|Excel 2007+ Dosyaları (*.xlsx*)|*.*" fd.FilterIndex = 2 fd.RestoreDirectory = True If fd.ShowDialog() = DialogResult.OK Then yol = fd.FileName End If Dim strconn As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & yol & ";Extended Properties=""Excel 12.0 Xml;HDR=YES"";" Dim conn As New OleDbConnection(strconn) conn.Open() Dim dtSheets As DataTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing) Dim listSheet As New List(Of String) Dim drSheet As DataRow For Each drSheet In dtSheets.Rows listSheet.Add(drSheet("TABLE_NAME").ToString()) Next ' //show sheetname in textbox where multiline is true For Each sheet As String In listSheet sayfa = sayfa & sheet & vbNewLine Next MsgBox(sayfa) conn.Close() End Sub