excel中想要b2至b12格双击弹消息框,要怎样写。
最好sheet1,sheet2 的b2至b12都要响应。
[解决办法]
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If (Sh.Name = "Sheet1 " Or Sh.Name = "Sheet2 ") And _
Target.Column = 2 And Target.Row > = 2 And Target.Row <= 12 Then
MsgBox "ok "
End If
End Sub
写到workbook里