0
嘿,我期待看到如何去移动1行,我目前在我的电子表格中。Vb.net Excel移动到下一行
我曾尝试:
Dim xlsApp As Excel.Application
Dim xlsWB As Excel.Workbook
Dim xlsSheet As Excel.Worksheet
Dim xlsCell As Excel.Range
xlsCell = xlsSheet.Range("A1", "A100")
For Each oRowRange As Excel.Range In xlsCell.Rows
For Each oCellRange As Excel.Range In oRowRange.Columns
If colorRGB = "252, 213, 180" Then
Debug.WriteLine(oCellRange.Text)
oCellRange.Offset(0, 1).Select()
Debug.WriteLine(oCellRange.Text)
etc...
End If
Next
Next
在上面的例子中,它不断把相同的文字:
BOB
BOB
当它真的应该是:
BOB
JON
因此,任何帮助将是巨大的!
明白了。谢谢布鲁斯! – StealthRT
@StealthRT - 当然,您也可以在第一行之后重置“oCell”,并执行我在编辑中显示的内容。 – BruceWayne