Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use selection change instead of double click event? ghost Excel Discussion (Misc queries) 1 December 26th 08 04:58 AM
Is there a double click event for cell? Ayo Excel Discussion (Misc queries) 3 June 6th 08 12:18 AM
Sheet After Double Click event? Tom Ogilvy Excel Programming 0 July 27th 04 05:59 PM
Key modifier for double-click event? Byrt Martinez[_3_] Excel Programming 1 February 20th 04 08:00 PM
Before Double Click Event gregork Excel Programming 4 February 9th 04 09:17 AM


All times are GMT +1. The time now is 04:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"