使用HorizontalAlignment属性控制水平对齐,此属性的值可设为以下常量之一:
xlCenter xlDistributed xlJustify xlLeft xlRight 使用VerticalAlignment属性控制垂直对齐,此属性的值可设为以下常量之一:xlBottom xlCenter xlDistributed xlJustify xlTop 例如下面的代码使选中部分水平居中、垂直居中:Sub 宏1() With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter End WithEnd Sub


- 相关评论
- 我要评论
-