在“工程”中没有“引用”Excel时,进行排序等操作,必须先对一些常数进行赋值,常用的一些常数为:
Public Const xlUp = -4162 '这几条常量赋值语句如果是Excel在引用中先期绑定,是不需要的,但是如果Excel是后期绑定的,则是必须的。
Public Const xlWhole = 1
Public Const xlPart = 2
Public Const xlByRows = 2
Public Const xlLandscape = 2
Public Const xlMaximized = -4137
Public Const xlAscending = 1
Public Const xlDescending = 2
Public Const xlNo = 2
Public Const xlTopToBottom = 1
Public Const xlPinYin = 1
Public Const xlSortTextAsNumbers = 1
Public Const xlPasteValues = -4163
Public Const xlNone = -4142
Public Const xlExcel8 = 56
Public Const xlEdgeLeft = 7
Public Const xlEdgeTop = 8
Public Const xlEdgeBottom = 9
Public Const xlEdgeRight = 10
Public Const xlInsideVertical = 11 '框内纵向线
Public Const xlInsideHorizontal = 12 '框内横向线
Public Const xlThin = 2 '细线
Public Const xlMedium = -4138 '粗线
Public Const xlThick = 4 '再粗线体
Public Const xlCenter = -4108
Public Const xlToLeft=-4159
Public Const wdAlignParagraphCenter = 1
Public Const wdAlignParagraphLeft = 0
Public Const wdAlignParagraphRight = 2
Public Const xlFillDefault=0