怎样列与列之间的数据交换移动呢?
解决方案 »
- webbrowser silent 设置为true 为什么它自己用变为false
- 关于Adodc1.refresh的错误,谁帮我看看啊,在线等待QQ251409037
- 谁说用adOpenDynamic游标类型就不能返回记录数RecordCount的??
- **************散分发泄怒气!~~~***********
- 怎样取得磁盘的剩余空间?
- 请给于关注---控件为什么时有时无???
- 我要用VB+ACCESS制作一个通讯录
- ██████★这里有武汉的高手吗?★██████
- 串行通信问题:如何利用mscomm进行远程单片机数据存取??
- 请教高手,ping 的原理是什么?请详细说一下,谢谢!
- vb 窗口
- 请教一个时间的问题
多余前移
Private Sub Form_Load()
With MSFlexGrid1
.row = 1
.col = 1
.Text = "524312"
.col = 2
.Text = "dfd3333"
.col = 3
.Text = "euui33"
End With
End SubPrivate Sub Command1_Click()
Dim strA As String
Dim strB As String
Dim strC As String
Dim strR(3) As String
Dim intS(3) As Integer
Dim strT As String
Dim i As Integer
Dim j As Integer
strA = "2"
strB = "4"
strC = "d"
With MSFlexGrid1
.row = 1
For j = 1 To 3
.col = j
intS(j - 1) = Len(.Text)
Next j
For j = 1 To 3
.col = j
For i = 1 To Len(.Text)
If Mid(.Text, i, 1) = strA Then
.Text = Left(.Text, i - 1) & Mid(.Text, i + 1, Len(.Text))
strR(j - 1) = strA
Exit For
ElseIf Mid(.Text, i, 1) = strB Then
.Text = Left(.Text, i - 1) & Mid(.Text, i + 1, Len(.Text))
strR(j - 1) = strB
Exit For
ElseIf Mid(.Text, i, 1) = strC Then
.Text = Left(.Text, i - 1) & Mid(.Text, i + 1, Len(.Text))
strR(j - 1) = strC
Exit For
End If
Next i
Next j
For j = 1 To 3
.col = j
.Text = .Text & strR(IIf(j = 3, 0, j))
Next j
For j = 3 To 2 Step -1
.col = j
strT = Left(.Text, Len(.Text) - intS(j - 1))
.Text = Mid(.Text, Len(strT) + 1, Len(.Text))
.col = j - 1
.Text = .Text & strT
Next j
End With
End Sub