Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default how to use selectionchange instead of doubleclick event?

Hi,
I am using the following code to autofilter a list if the user wants to see
more details of employee training. The problem is, if I want to see more
details I have to double click first on employee ID and click on a link
beside employee ID. What I want is, once I click on the link, the link takes
me to the sheet of training and filter employee ID and training of him. How
to adjust the blow code?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim cell As Range
Sheets("a1").Rows.EntireRow.Interior.ColorIndex = xlNone
Sheets("a1").Rows.EntireRow.Hidden = False
If Target.Column < 2 Then Exit Sub
For Each cell In Sheets("a1").Range("a2:a200")
If cell.Value = ActiveCell.Value Then
cell.EntireRow.Interior.ColorIndex = 6
Else
cell.EntireRow.Hidden = True
Cells(1, 1).EntireRow.Hidden = False
End If
Next cell
End Sub

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
ON.DOUBLECLICK function C Brandt Excel Discussion (Misc queries) 8 May 20th 07 12:27 AM
Worksheet SelectionChange Event mjack003 Excel Discussion (Misc queries) 2 May 8th 06 08:35 PM
doubleclick PH NEWS Excel Worksheet Functions 1 March 10th 06 11:54 AM
Disable SelectionChange Event BillCPA Excel Discussion (Misc queries) 2 February 17th 06 06:45 PM
Excel Automation SelectionChange event cpotts Excel Discussion (Misc queries) 1 December 20th 04 05:15 PM


All times are GMT +1. The time now is 02:31 PM.

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"