Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I double click any one of these cell of this line of code, the double click just selects that cell, cursor blinking and cell in the edit mode.
If Target.Address = "$G$14,$G$36,$G$58,$G$80" Then Each of these cells contain a Vlookup formula: =IF(ISERROR(VLOOKUP(G7,$AJ$4:$AL$43,3,0)),"",VLOOK UP(G7,$AJ$4:$AL$43,3,0)) and will return a blank cell, or one of these strings, Notes_1, Notes_2 or Notes_3 I think my "If Target.Address =" line is the culprit. I have made the code work with a single "If Range("G14").Value = "Notes_1" Then" statement. Thanks. Howard Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim MyIntl As String Dim MyNote As String MyNote = Target.Value If Target.Address = "$G$14,$G$36,$G$58,$G$80" Then MyIntl = InputBox("Enter your Initials :", "Read Notes.") If Len(MyIntl) = 0 Then MsgBox "Enter your initials to read notes", vbCritical Else Cells(Rows.Count, "AN").End(xlUp).Offset(1, 0) = MyIntl Cells(Rows.Count, "AN").End(xlUp) _ .Offset(0, 1) = MyNote & " " & Format(Now(), "dd/MM/yyy hh:mm AMPM") If Target.Value = "Notes_1" Then MsgBoxNotes_1 If Target.Value = "Notes_2" Then MsgBoxNotes_2 If Target.Value = "Notes_3" Then MsgBoxNotes_3 End If Cancel = True End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell click on one cell selects 2 or 3 cells? | Excel Worksheet Functions | |||
VB CODE for double click? | Excel Programming | |||
How do I code a cell to display the current date on double-click? | Excel Programming | |||
How to trigger code in Excel add-in after double-click or right-cl | Excel Programming | |||
Click on graph bar to execute a double-click in a pivot table cell | Charts and Charting in Excel |