[英]What does Range.HorizontalAlignment = 1 mean in excel
I try to get sheet format in VBA, I found there is default value for HorizontalAlignment is equal to 1, but there is no this value in MSND, here are possible values, does anyone help me? 我尝试在VBA中获取表单格式,我发现HorizontalAlignment的默认值等于1,但在MSND中没有这个值,这里有可能的值,有没有人帮我?
xlCenter = -4108
xlDistributed = -4117
xlJustify = -4130
xlLeft = -4131
xlRight = -4152
Const xlHAlignGeneral = 1
You're looking at the wrong enum. 你看错了枚举。 Look into
XlHAlign
: 看看
XlHAlign
:
There's also a XlVAlign
enum, for vertical alignment. 还有一个
XlVAlign
枚举,用于垂直对齐。 You can find it (and everything else) in the Object Browser (F2): 您可以在对象浏览器 (F2)中找到它(以及其他所有内容):
Seems the xlCenter
you're using is defined in the Excel.Constants
enum. 看来
xlCenter
您所使用的定义Excel.Constants
枚举。 XlHAlign
and XlVAlign
enum values are likely just aliases for them. XlHAlign
和XlVAlign
枚举值可能只是它们的别名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.