问题描述
当使用"with selection"和"end with"操作来自访问程序的excel中的范围选择时,程序会运行一次,然后当我再次运行时挂起;我需要结束声明不同?
XLAPP.Application.Range(Selection,Selection.End(xlToRight))。选择
使用XLAPP.Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.Orientation = 90
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
结束
when manipulating a range selection in excel from an access program using the 'with selection' and 'end with' the program works once then hangsup when I run a second time; do I need to end the with statement differently?
XLAPP.Application.Range(Selection, Selection.End(xlToRight)).Select
With XLAPP.Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.Orientation = 90
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
这篇关于从访问程序中操纵excel范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!