View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Double click fails to run the code, just selects the cell

Hi Howard,

Am Sun, 5 May 2013 02:44:28 -0700 (PDT) schrieb Howard:

If Target.Address = "$G$14,$G$36,$G$58,$G$80" Then


in an IF-Statement you have to write
If Target.address ="$G$14" or target.address.....
Put it in a Select Case-Statement. There you can write all addresses
with comma as delimiter:

Select Case Target.Address
Case "$G$14", "$G$36", "$G$58", "$G$80"
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 MsgBox Notes_1
' If Target.Value = "Notes_2" Then MsgBox Notes_2
' If Target.Value = "Notes_3" Then MsgBox Notes_3
End If
Cancel = True
End Select

If Target.Value = "Notes_1" Then MsgBox Notes_1
If Target.Value = "Notes_2" Then MsgBox Notes_2
If Target.Value = "Notes_3" Then MsgBox Notes_3

will not work for me. What is MsgBoxNotes_1??


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2