Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code question
I'm using the following to launch some VBA when a cell is double
clicked. ++++++++ Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim rng As Range Dim MyLastRow As String Set rng =Worksheets("Sheet1").Range("A1").SpecialCells(xlC ellTypeLastCell) MyLastRow = rng.Row rows = "J1:J" & MyLastRow If Not Intersect(Target, Range(rows)) Is Nothing Then Cancel = True ********* Code here End If End Sub ++++++++++ Howver, I'd like to change that so any cell in the range S2 to CD5972 achieves the same result. Is that possible? Thanks - Kirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code question
Answered over two hours ago in your earlier post.
-- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "kirkm" wrote in message I'm using the following to launch some VBA when a cell is double clicked. ++++++++ Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim rng As Range Dim MyLastRow As String Set rng =Worksheets("Sheet1").Range("A1").SpecialCells(xlC ellTypeLastCell) MyLastRow = rng.Row rows = "J1:J" & MyLastRow If Not Intersect(Target, Range(rows)) Is Nothing Then Cancel = True ********* Code here End If End Sub ++++++++++ Howver, I'd like to change that so any cell in the range S2 to CD5972 achieves the same result. Is that possible? Thanks - Kirk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
code question | Excel Discussion (Misc queries) | |||
vb code question | Excel Discussion (Misc queries) | |||
VB Code Question | Excel Discussion (Misc queries) | |||
Code Question | Excel Programming | |||
Code Question | Excel Programming |