十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:域名与空间、网站空间、营销软件、网站建设、雨山网站维护、网站推广。
Dim a As String = "c:\windows\system"
For Each ws In My.Computer.FileSystem.GetFiles(a)
Dim kzm As String = ws.Substring(InStrRev(ws, "."), ws.Length - InStrRev(ws, ".")) '定义扩展名变量
If kzm = "mp4" Or kzm = "avi" Or kzm = "flv" Then '这里一定要注意扩展名的大小写,如aviAVI的
Me.ListBox1.Items.Add(ws)
End If
Next
End Sub
Sub Macro1()
Columns("A:A").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$A$5").AutoFilter Field:=1, Criteria1:="1"
Selection.Copy
Sheets("Sheet2").Select
Columns("A:A").Select
ActiveSheet.Paste
End Sub
你录制个宏就有代码了 如上代码所示
Sub Find(ByRef Obj As DataGridView, Optional ByVal value As String = Nothing, Optional ByVal cellIndex As Integer = 1)
For Each i As DataGridViewRow In DataGridView1.Rows
If value Is Nothing OrElse value = "" Then
i.Visible = True
Else
Try
If i.Cells(cellIndex).Value IsNot Nothing Then i.Visible = i.Cells(cellIndex).Value = value
Catch ex As Exception
End Try
End If
Next
End Sub
Find(DataGridView1, "张三",1)
您好!
1.ddlname为dropdownlist的ID值
2.dropdownlist绑定sql语句为
select * from tb where name = '"+ddlname.SelectedValue.ToString()+""
3.点击dropdownlist下拉扭时,改变ddlname.SelectedValue.ToString()的值,就可以筛选数据了。