- <p>Public Sub ButtunClick(sender As Object,e As SpreadsheetGear.Windows.Forms.ShapeActionEventArgs)
-
- If e.shape.name="LBB" AND Range("SelectAll_B").Value = "全选" then
- For Each Target As IRange In Range("SelectArea_B")
- If Target.Offset(0,-9).Text <> "" And Target.Offset(0,-1).Text = "赊账" Then
- Target.Value = "√"
- End If
- Next
- Range("SelectAll_B").Value = "取消"
- Elseif e.shape.name="LBB" AND Range("SelectAll_B").Value = "取消" then
- For Each Target As IRange In Range("SelectArea_B")
- If Target.Offset(0,-9).Text <> "" Then
- Target.Value = ""
- End If
- Next
- Range("SelectAll_B").Value = "全选"
- ElseIf e.shape.name="LBA" AND Range("SelectAll_A").Value = "全选" then
- For Each Target As IRange In Range("SelectArea_A")
- If Target.Offset(0,-11).Text <> "" Then
- Target.Value = "√"
- End If
- Next
- Range("SelectAll_A").Value = "取消"
- Elseif e.shape.name="LBA" AND Range("SelectAll_A").Value = "取消" then
- For Each Target As IRange In Range("SelectArea_A")
- If Target.Offset(0,-11).Text <> "" Then
- Target.Value = ""
- End If
- Next
- Range("SelectAll_A").Value = "全选"
- End if
- End Sub'按钮/标签点击事件</p>
复制代码
SelectAll_A,SelectAll_B是全选与取消所在单元格的别名
SelectArea_A,SelectArea_B是全选的区域
|
|
hessen