v = rs1.Fields.Count
X = rs2.RecordCount
xlSheet.Range(Cells(2, 1), Cells((2 + X), v)).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
*****************
问题出现在两次应用Access导出数据到Excel中,一次打印,一次把保存,分别为不同的数据表。如果只使用一种不会出现错误,使用两种则会出现错误。错误均是'Range'的方法'_Global'失败,请指教。谢谢
X = rs2.RecordCount
xlSheet.Range(Cells(2, 1), Cells((2 + X), v)).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
*****************
问题出现在两次应用Access导出数据到Excel中,一次打印,一次把保存,分别为不同的数据表。如果只使用一种不会出现错误,使用两种则会出现错误。错误均是'Range'的方法'_Global'失败,请指教。谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货