Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 4934|回复: 2

[已解决]如何自动添加边框

[复制链接]
发表于 2010-2-8 23:15 | 显示全部楼层 |阅读模式

http://www.excelpx.com/dispbbs.asp?boardid=5&replyid=1456045&id=70765&page=1&skin=0&Star=1

这是个很好的录入功能。请问学生录入后,能在录入表中自动给新增加的学生画上边框吗?

最佳答案
2010-2-9 15:52
这样?
Private Sub CommandButton1_Click() '导入
Dim x%, y%
With Sheet2
    x = .[A65536].End(xlUp).Row + 1
        For y = 1 To 10
            .Cells(x, y) = Me.Controls("Tet" & y).Text
        Next y
        .UsedRange.Borders.ColorIndex = 1
  End With
  Call CommandButton2_Click
End Sub
发表于 2010-2-8 23:37 | 显示全部楼层

自己录个宏,再去修改一下。可能就可以了
回复

使用道具 举报

发表于 2010-2-9 15:52 | 显示全部楼层    本楼为最佳答案   

这样?
Private Sub CommandButton1_Click() '导入
Dim x%, y%
With Sheet2
    x = .[A65536].End(xlUp).Row + 1
        For y = 1 To 10
            .Cells(x, y) = Me.Controls("Tet" & y).Text
        Next y
        .UsedRange.Borders.ColorIndex = 1
  End With
  Call CommandButton2_Click
End Sub
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-16 15:13 , Processed in 0.197639 second(s), 7 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表