找回密码
 立即注册

QQ登录

只需一步,快速开始

tianyake
注册会员   /  发表于:2014-6-9 17:00:00
11#
有结果了吗
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-6-10 18:07:00
12#
回复 11楼tianyake的帖子

你好,

目前我还没有调试成功。
我看到你的数据源只有两列,而且并没有设置 ss.Col = 3 ss.DataFillEvent = True 。

明天我会继续跟进该问题。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-6-18 20:14:00
13#
回复 13楼tianyake的帖子

抱歉,让你久等了。
需要通过 GetDataFillData 方法来获取当前绑定单元格的数据,获取方法如下:

  1. Private Sub ss_DataFill(ByVal Col As Long, ByVal Row As Long, ByVal DataType As Integer, ByVal fGetData As Integer, Cancel As Integer)

  2. If Col = 3 Then
  3.     Dim v As Variant
  4.     If ss.GetDataFillData(v, DataType) Then
  5.         If v = "" Then
  6.             With ss
  7.                 .Col = 3
  8.                 .Col2 = 3
  9.                 .Row = Row
  10.                 .Row2 = Row
  11.                 .CellType = CellTypeButton
  12.             End With
  13.         End If
  14.     End If
  15. End If
复制代码


Demo:

DataFill.zip (14.72 KB, 下载次数: 351)
回复 使用道具 举报
12
您需要登录后才可以回帖 登录 | 立即注册
返回顶部