VB 数据排序
来源:互联网 发布:淘宝店铺客服模块代码 编辑:程序博客网 时间:2024/04/28 22:25
Public Sub SortArray(pArray, Optional Col As Integer = -1)
Dim i As Integer, j As Integer
Dim temp
Dim m As Integer
If Col < 0 Then
For i = LBound(pArray) To UBound(pArray) - 1
For j = UBound(pArray) To i + 1 Step -1
If pArray(j) < pArray(j - 1) Then
temp = pArray(j)
pArray(j) = pArray(j - 1)
pArray(j - 1) = temp
End If
Next j
Next i
Else
For i = LBound(pArray, 1) To UBound(pArray, 1) - 1
For j = UBound(pArray, 1) To i + 1 Step -1
If pArray(j, Col) < pArray(j - 1, Col) Then
temp = pArray(j, Col)
pArray(j, Col) = pArray(j - 1, Col)
pArray(j - 1, Col) = temp
End If
Next j
Next i
End If
End Sub
Dim i As Integer, j As Integer
Dim temp
Dim m As Integer
If Col < 0 Then
For i = LBound(pArray) To UBound(pArray) - 1
For j = UBound(pArray) To i + 1 Step -1
If pArray(j) < pArray(j - 1) Then
temp = pArray(j)
pArray(j) = pArray(j - 1)
pArray(j - 1) = temp
End If
Next j
Next i
Else
For i = LBound(pArray, 1) To UBound(pArray, 1) - 1
For j = UBound(pArray, 1) To i + 1 Step -1
If pArray(j, Col) < pArray(j - 1, Col) Then
temp = pArray(j, Col)
pArray(j, Col) = pArray(j - 1, Col)
pArray(j - 1, Col) = temp
End If
Next j
Next i
End If
End Sub
- VB 数据排序
- vb排序
- vb排序
- VB排序
- vb冒泡排序函数
- vb正整数排序法
- VB 冒泡排序
- VB.Net 冒泡排序
- vb快速排序源代码
- VB-排序题
- VB作业2 排序
- vb(选择法排序)
- vb作业-排序法
- vb 排序法
- 冒泡排序法---vb
- 从VB来看-排序
- vb.net下载数据
- [VB.NET]数据导入
- 某公司招聘的题目[二]
- IT人的一篇日记转贴
- 实现VSTO操作WORD之三 --------实现WORD与数据库相互操作
- 精典
- 54部金庸剧(所有版本),你最喜欢哪个???
- VB 数据排序
- 海瑞在 1566
- POSTFIX+SASL2支持通过MySQL认证安装手记
- 数据结构学习_图(1)深度优先搜索、广度优先搜索和最小生成树
- 正则表达式regular expression详述
- 基于XML的无限分类(jdom+xpath)
- 2007年第5周最热网友收藏(转)
- 过程导入和推广的方法
- oracle decode函数的用法