请教:我在程序打开excel并通过程序画上框架线加上这段程序后,第一次查询可以。但
我在程序打开excel并通过程序画上框架线加上这段程序后,第一次查询可以。但是再继续查询就只执行cont = Adodc1.Recordset.RecordCount Range(xlsheet.Cells(2, 1), xlsheet.Cells(cont + 2, 6)).Select
下面的就不执行了,只有关闭该程序后再运行才能执行?谢谢各位!
cont = Adodc1.Recordset.RecordCount
Range(xlsheet.Cells(2, 1), xlsheet.Cells(cont + 2, 6)).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With