PC Review


Reply
Thread Tools Rate Thread

Change single click to double click

 
 
=?Utf-8?B?QXVja2xhbmRBc3NhdWx0?=
Guest
Posts: n/a
 
      6th Mar 2007
I have a number of hyperlink in my spreadsheet that links to pdf files on the
net. Users often select these accidently when navigating the spreadsheet. I
want to change my spreadsheet so that it requires users to double-click for
the hyperlinks to work. How do I do this?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      6th Mar 2007
Very easy. If you enter:

http://www.cnn.com

in a cell, Excel will generate a "click-able" hyper link if you have enabled
this with:

Tools > Options > Spelling > AutoCorrect > Autoformat as you type
and check the hyperlink box.

You don't need to change this option.

Enter the URL with a single quote (apostrophe) in front:

'http://www.cnn.con

and then enter this Event macro in worksheet code:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
ActiveWorkbook.FollowHyperlink Address:=Target.Value
End Sub


so a single click will do nothing, but double-click and away you go!


REMEMBER: worksheet code.
--
Gary's Student
gsnu200709


"AucklandAssault" wrote:

> I have a number of hyperlink in my spreadsheet that links to pdf files on the
> net. Users often select these accidently when navigating the spreadsheet. I
> want to change my spreadsheet so that it requires users to double-click for
> the hyperlinks to work. How do I do this?

 
Reply With Quote
 
okrob
Guest
Posts: n/a
 
      6th Mar 2007
On Mar 6, 12:58 pm, Gary''s Student
<GarysStud...@discussions.microsoft.com> wrote:
> Very easy. If you enter:
>
> http://www.cnn.com
>
> in a cell, Excel will generate a "click-able" hyper link if you have enabled
> this with:
>
> Tools > Options > Spelling > AutoCorrect > Autoformat as you type
> and check the hyperlink box.
>
> You don't need to change this option.
>
> Enter the URL with a single quote (apostrophe) in front:
>
> 'http://www.cnn.con
>
> and then enter this Event macro in worksheet code:
>
> Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
> Boolean)
> ActiveWorkbook.FollowHyperlink Address:=Target.Value
> End Sub
>
> so a single click will do nothing, but double-click and away you go!
>
> REMEMBER: worksheet code.
> --
> Gary's Student
> gsnu200709
>
>
>
> "AucklandAssault" wrote:
> > I have a number of hyperlink in my spreadsheet that links to pdf files on the
> > net. Users often select these accidently when navigating the spreadsheet. I
> > want to change my spreadsheet so that it requires users to double-click for
> > the hyperlinks to work. How do I do this?- Hide quoted text -

>
> - Show quoted text -


Won't that try to fire every time a cell is double clicked, and not
just the ones that are links giving you an error when you double click
a cell that's not an actual address?

 
Reply With Quote
 
okrob
Guest
Posts: n/a
 
      6th Mar 2007
On Mar 6, 1:06 pm, "okrob" <merobwhoare...@yahoo.com> wrote:
> On Mar 6, 12:58 pm, Gary''s Student
>
>
>
>
>
> <GarysStud...@discussions.microsoft.com> wrote:
> > Very easy. If you enter:

>
> >http://www.cnn.com

>
> > in a cell, Excel will generate a "click-able" hyper link if you have enabled
> > this with:

>
> > Tools > Options > Spelling > AutoCorrect > Autoformat as you type
> > and check the hyperlink box.

>
> > You don't need to change this option.

>
> > Enter the URL with a single quote (apostrophe) in front:

>
> > 'http://www.cnn.con

>
> > and then enter this Event macro in worksheet code:

>
> > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
> > Boolean)
> > ActiveWorkbook.FollowHyperlink Address:=Target.Value
> > End Sub

>
> > so a single click will do nothing, but double-click and away you go!

>
> > REMEMBER: worksheet code.
> > --
> > Gary's Student
> > gsnu200709

>
> > "AucklandAssault" wrote:
> > > I have a number of hyperlink in my spreadsheet that links to pdf files on the
> > > net. Users often select these accidently when navigating the spreadsheet. I
> > > want to change my spreadsheet so that it requires users to double-click for
> > > the hyperlinks to work. How do I do this?- Hide quoted text -

>
> > - Show quoted text -

>
> Won't that try to fire every time a cell is double clicked, and not
> just the ones that are links giving you an error when you double click
> a cell that's not an actual address?- Hide quoted text -
>
> - Show quoted text -


You should add the line
On Error Resume Next

or handle the error some other way.

Rob

 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      6th Mar 2007
Hi Rob:

You are 100% correct.

It all depends on how the user's worksheet is structured. If the
pseudo-links are in a single column, then we could test intersect target and
that column.

We could test PreFixCharacter for the target.

As you pointed out, On Error should also be used.

Additionally Cancel should be handled as well to avoid unnecessary edit
issues.
--
Gary''s Student
gsnu200709


"okrob" wrote:

> On Mar 6, 1:06 pm, "okrob" <merobwhoare...@yahoo.com> wrote:
> > On Mar 6, 12:58 pm, Gary''s Student
> >
> >
> >
> >
> >
> > <GarysStud...@discussions.microsoft.com> wrote:
> > > Very easy. If you enter:

> >
> > >http://www.cnn.com

> >
> > > in a cell, Excel will generate a "click-able" hyper link if you have enabled
> > > this with:

> >
> > > Tools > Options > Spelling > AutoCorrect > Autoformat as you type
> > > and check the hyperlink box.

> >
> > > You don't need to change this option.

> >
> > > Enter the URL with a single quote (apostrophe) in front:

> >
> > > 'http://www.cnn.con

> >
> > > and then enter this Event macro in worksheet code:

> >
> > > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
> > > Boolean)
> > > ActiveWorkbook.FollowHyperlink Address:=Target.Value
> > > End Sub

> >
> > > so a single click will do nothing, but double-click and away you go!

> >
> > > REMEMBER: worksheet code.
> > > --
> > > Gary's Student
> > > gsnu200709

> >
> > > "AucklandAssault" wrote:
> > > > I have a number of hyperlink in my spreadsheet that links to pdf files on the
> > > > net. Users often select these accidently when navigating the spreadsheet. I
> > > > want to change my spreadsheet so that it requires users to double-click for
> > > > the hyperlinks to work. How do I do this?- Hide quoted text -

> >
> > > - Show quoted text -

> >
> > Won't that try to fire every time a cell is double clicked, and not
> > just the ones that are links giving you an error when you double click
> > a cell that's not an actual address?- Hide quoted text -
> >
> > - Show quoted text -

>
> You should add the line
> On Error Resume Next
>
> or handle the error some other way.
>
> Rob
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change mouse from single click to double click? Mike Microsoft Outlook Discussion 1 16th Jun 2008 08:29 PM
How to change syperlink from single click to double click syperlinker Microsoft Excel Worksheet Functions 0 13th Jun 2008 05:01 PM
hot to change mouse to single click instead of double click to ope =?Utf-8?B?am9zZXBoIGJlbGw=?= Windows Vista Hardware 1 14th Jun 2006 09:03 PM
Re: Change single click to double click???????????????? jopa66 Windows XP Help 0 10th Aug 2004 05:24 AM
Re: Change single click to double click???????????????? jopa66 Windows XP Help 0 10th Aug 2004 05:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:59 AM.