View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Robert Christie[_3_] Robert Christie[_3_] is offline
external usenet poster
 
Posts: 117
Default Macro to add 1 or more days to a date

Hi JE
Thank you for your post, it works well.
But why oh why are there so many ways to achieve the same
thing in Excel.
It certainly makes mastering Excel very hard.

Thank you

Regards Bob C.


-----Original Message-----
You can set the Cancel property to True instead

of "moving the cursor":

Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Range, Cancel As Boolean)
With Target
If .Address(False, False) = "B2" Then
Cancel = True
If IsNumeric(Range("E2").Value) Then _
.Value = .Value + Int(Range

("E2").Value)
End If
End With
End Sub



In article ,
"Robert Christie"

wrote:

I added a Range("??").Select line of code before the

End
Sub last line to move curser to a 'neutral corner' as

a
safety measure and to be able to doubleclick the Cell

A1
again. As you know Doubleclicking a cell allows you to
edit in the cell.

.