Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Double-click Event question
(Excel 97)
I am trying to code a print function, so that when a user double clicks on a named range, certain rows of the worksheet are printed. No problem with the printing aspect, but I'm having trouble getting the double click event to work. I prefer to used named ranges instead of the value of the particular cells to make it more generic, also so I don't have to change the code if the cell value changes. Thanks in advance! BW |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Double-click Event question
In the worksheet's code module:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) Cancel = True If Not Intersect(Target, Range("MyNamedRange")) Is Nothing Then 'your print code here End If End Sub -- Vasant "Bob Wall" wrote in message ... (Excel 97) I am trying to code a print function, so that when a user double clicks on a named range, certain rows of the worksheet are printed. No problem with the printing aspect, but I'm having trouble getting the double click event to work. I prefer to used named ranges instead of the value of the particular cells to make it more generic, also so I don't have to change the code if the cell value changes. Thanks in advance! BW |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Double-click Event question
Works perfectly, thanks so much!
BW "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... In the worksheet's code module: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _ Cancel As Boolean) Cancel = True If Not Intersect(Target, Range("MyNamedRange")) Is Nothing Then 'your print code here End If End Sub -- Vasant "Bob Wall" wrote in message ... (Excel 97) I am trying to code a print function, so that when a user double clicks on a named range, certain rows of the worksheet are printed. No problem with the printing aspect, but I'm having trouble getting the double click event to work. I prefer to used named ranges instead of the value of the particular cells to make it more generic, also so I don't have to change the code if the cell value changes. Thanks in advance! BW |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to use selection change instead of double click event? | Excel Discussion (Misc queries) | |||
Is there a double click event for cell? | Excel Discussion (Misc queries) | |||
Sheet After Double Click event? | Excel Programming | |||
Key modifier for double-click event? | Excel Programming | |||
Before Double Click Event | Excel Programming |