以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 请教一下VBA里面的Selection在Foxtable中的使用 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=67168) |
-- 作者:sgneb -- 发布时间:2015/4/19 17:39:00 -- 请教一下VBA里面的Selection在Foxtable中的使用 我在编写一个Foxtable导出到Excel的函数,里面涉及到调整单元格的格式,以前在Excel中编的VBA想直接拷过来用,但是提示selection没定义,不知道怎么处理,请大神帮帮忙吧!先谢啦 Wb.WorkSheets(1).Range("A1", AddS).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlHairline .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlHairline .ColorIndex = xlAutomatic End With Selection.Font.Size = 8 Selection.Font.Name = "Arial" |
-- 作者:狐狸爸爸 -- 发布时间:2015/4/19 21:25:00 -- 参考: http://www.foxtable.com/help/topics/2121.htm
|
-- 作者:sgneb -- 发布时间:2015/4/20 6:58:00 -- 谢谢狐爸的回答,但是里面没有slection的详细介绍啊! |
-- 作者:狐狸爸爸 -- 发布时间:2015/4/20 9:19:00 -- app.Selection |