Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting a SheetBeforeDoubleClick to cell range

Status
Not open for further replies.

apeoortje

Technical User
May 26, 2004
46
0
0
NL
I'm using the following code to enter the time on a goup of cell, is there any way on limiting it'll only work in cells C4:D34?

Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Selection.Value = Time
End Sub
 
Hi
have a look at the Intersect method in help.

You should end up with something like

if not intersect(target,range("a1:c5")) is nothing then
'do stuff
end if

Happy Friday

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top