Foxtable(狐表)用户栏目专家坐堂 → 请教一下VBA里面的Selection在Foxtable中的使用


  共有3132人关注过本帖树形打印复制链接

主题:请教一下VBA里面的Selection在Foxtable中的使用

帅哥哟,离线,有人找我吗?
sgneb
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:73 积分:661 威望:0 精华:0 注册:2014/1/4 8:03:00
请教一下VBA里面的Selection在Foxtable中的使用  发帖心情 Post By:2015/4/19 17:39:00 [只看该作者]

我在编写一个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"

 回到顶部
帅哥哟,离线,有人找我吗?
狐狸爸爸
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251054 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2015/4/19 21:25:00 [只看该作者]


 回到顶部
帅哥哟,离线,有人找我吗?
sgneb
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:73 积分:661 威望:0 精华:0 注册:2014/1/4 8:03:00
  发帖心情 Post By:2015/4/20 6:58:00 [只看该作者]

谢谢狐爸的回答,但是里面没有slection的详细介绍啊!

 回到顶部
帅哥哟,离线,有人找我吗?
狐狸爸爸
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251054 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2015/4/20 9:19:00 [只看该作者]

app.Selection

 回到顶部