VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > 编程开发 > vb >
  • excel vba教程之数据有效性不重复值

1.  数据有效性不重复值  

‘http://club.excelhome.net/dispbbs.asp?boardID=2&ID=270071&page=1&px=0
Sub yy()
  Dim i%, x(), rng
  Set d = CreateObject("Scripting.Dictionary")
  rng = Sheet5.Range(Sheet5.[b2], Sheet5.[b2].End(xlDown))
  For i = 1 To UBound(rng)
    c = d(rng(i, 1))
  Next
  With [b3].Validation
    .Delete
    .Add Type:=xlValidateList, Formula1:=Join(d.keys, ",")
  End With
End Sub

相关教程