Thank you so much Santos it worked perfectly and you are a champion....

keep up the good work mate...

Regards


Chris

On Thu, Jun 30, 2011 at 10:15 AM, santosh bahuguna <
santoshbahug...@gmail.com> wrote:

>
> use this
>
>
> If (Target.Column <> 3) And (Target.Column <> 4) Then
>
> Please find the attached for solution
>
> Regards
> Santosh Bahuguna
>
>   On Tue, Jun 28, 2011 at 9:58 PM, Christopher Kevin <
> christopher....@gmail.com> wrote:
>
>>
>> Dear Experts,
>>
>> Can anyone please help me to solve the problem in the attached file?
>>
>> *Porblem:*
>>
>> When I clcik on either of the two columns (C or D) on where it says "Click
>> to view or Upload Report" or Click to view or upload CA Plan" I would like
>> the following Worksheet Selection Change Event to fire up to display the
>> Insert Hyperlink Dialog
>>
>> The is the code which is firing only for* Column C and not column D*.
>>
>
>
>
>>
>>
>> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
>>
>>     'The code below is to add hyperlink on the audit sheet in column P
>>
>> 'make sure we haven't selected more than one cell
>>
>> If Target.Cells.Count > 1 Then Exit Sub
>>
>> 'make sure we only hyperlink the cells of one column ("P")
>>
>> If Target.Column <> 3 Then Exit Sub
>>
>> 'check the cell isnt empty
>>
>> If Target = vbNullString Then Exit Sub
>>
>> 'check that it's not already a hyperlink
>>
>> If Target.Hyperlinks.Count = 1 Then Exit Sub
>>
>> 'create our hyperlink
>>
>> Application.Dialogs(xlDialogInsertHyperlink).Show
>>
>>
>> '---------------------------------------------------------------------------------------
>>
>>  'The code below is to add hyperlink on the sheet in column Q
>>
>> 'make sure we haven't selected more than one cell
>>
>> If Target.Cells.Count > 1 Then Exit Sub
>>
>> 'make sure we only hyperlink the cells of one column ("Q")
>>
>> If Target.Column <> 4 Then Exit Sub
>>
>> 'check the cell isnt empty
>>
>> If Target = vbNullString Then Exit Sub
>>
>> 'check that it's not already a hyperlink
>>
>> If Target.Hyperlinks.Count = 1 Then Exit Sub
>>
>> 'create our hyperlink
>>
>> Application.Dialogs(xlDialogInsertHyperlink).Show
>>
>>
>> End Sub
>>
>>
>> Thank you in advance for any help.
>>
>> Chris
>>
>> --
>>
>> ----------------------------------------------------------------------------------
>> Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip
>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link
>> http://www.facebook.com/discussexcel
>>
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to