Hi
using this code i am able to load excel .xlsm into a datagridview but how would i use a textchaged event on textbox1.text to display only rows that contain what is in the textbox
thanks
using this code i am able to load excel .xlsm into a datagridview but how would i use a textchaged event on textbox1.text to display only rows that contain what is in the textbox
thanks
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim con As OleDbConnection
Dim str As String
Dim cmd As OleDbCommand
Dim da As OleDbDataAdapter
Dim table As DataTable = New DataTable()
con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\test\jobcardreg.xlsm;Extended Properties=""Excel 12.0 Macro;HDR=YES"";") '
str = "Select * From [Sheet1$]"
cmd = New OleDbCommand(str, con)
da = New OleDbDataAdapter(cmd)
con.Open()
da.Fill(table)
Me.DataGridView1.DataSource = table
End Sub