vb如何设置excel某一个单元格内容居中显示?
请问:vb如何设置excel某单元格的内容居中显示?xlSheet.Cells(1,1).HorizontalAlignment=xlCenter这样设置不对吗?...
请问:vb如何设置excel某单元格的内容居中显示?xlSheet.Cells(1, 1).HorizontalAlignment = xlCenter这样设置不对吗?
展开
2个回答
展开全部
很多亩坦东西不会可以先操亏拍作录制一销耐羡个宏,打开看看代码你就会了
Range("F36").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
Range("F36").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
End With
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
dim
ex
as
object
dim
exwbook
as
object
dim
exsheet
as
object
set
ex
=
createobject("excel.application")
set
exwbook
=
ex.workbooks().add
set
exsheet
=
exwbook.worksheets("sheet1")
exsheet.cells.horizontalalignment
=
xlcenter
//居腊雀中问题
exsheet.cells.verticalalignment
=
xlcenter
这个问题我也遇到过
我从excel的宏芹唤中得到轮首早了启发
最后搞定了
ex
as
object
dim
exwbook
as
object
dim
exsheet
as
object
set
ex
=
createobject("excel.application")
set
exwbook
=
ex.workbooks().add
set
exsheet
=
exwbook.worksheets("sheet1")
exsheet.cells.horizontalalignment
=
xlcenter
//居腊雀中问题
exsheet.cells.verticalalignment
=
xlcenter
这个问题我也遇到过
我从excel的宏芹唤中得到轮首早了启发
最后搞定了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询