Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default Hyperlink Delete problem

Hi,

I use the following sub to delete the mail to hyperlinks that appear
for any email addresses entered in the sheet.

Public Sub RemoveHyperlinks(rng As Range)
Dim h As Hyperlink
For Each h In rng.Hyperlinks
h.Delete
Next h
End Sub

When the sheet is not protected it executes fine.
When the sheet is protected and the cells are locked the method fails
as expected.
But if the sheet is protected and the cells are unlocked then the
method does not remove the hyperlinks. In fact when I went into debug
mode and watched 'rng', it reported rng with Hyperlinks.Count=0 .

After this method the sheets hyperlink part is in a strange state. It
does not create hyperlinks anymore (yippee), even when you remove the
protection. But I am guessing this is an invalid state and could mess
up the rest of the execution.

Any explanations?

Thanks and regards,
Jayant

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Hyperlink Delete problem


if you dont want excel to convert (typed) text to url/hyperlinks
simply turn of autocorrect options.

Tools/AC options
tab:AF as you type

DEselect
Replace as you type:
internet and networkpaths with hyperlinks

jippee indeed.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


jjk wrote :

Hi,

I use the following sub to delete the mail to hyperlinks that appear
for any email addresses entered in the sheet.

Public Sub RemoveHyperlinks(rng As Range)
Dim h As Hyperlink
For Each h In rng.Hyperlinks
h.Delete
Next h
End Sub

When the sheet is not protected it executes fine.
When the sheet is protected and the cells are locked the method fails
as expected.
But if the sheet is protected and the cells are unlocked then the
method does not remove the hyperlinks. In fact when I went into debug
mode and watched 'rng', it reported rng with Hyperlinks.Count=0 .

After this method the sheets hyperlink part is in a strange state. It
does not create hyperlinks anymore (yippee), even when you remove the
protection. But I am guessing this is an invalid state and could mess
up the rest of the execution.

Any explanations?

Thanks and regards,
Jayant

  #3   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default Hyperlink Delete problem

Hi keepITCool,

Thanks for your response. However, The option to turn off the
autocorrect is not available in older versions of Excel. This is the
reason for the VBA code.
Were you able to duplicate the problem?

Thanks and regards,
Jayant

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Hyperlink Delete problem

afaik
xl97 doesnt autocorrect.
xl2k ????? (dont have cant check)
xlXP/xl2003 have the option to (de)select

will check into replication ltr.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


jjk wrote :

Hi keepITCool,

Thanks for your response. However, The option to turn off the
autocorrect is not available in older versions of Excel. This is the
reason for the VBA code.
Were you able to duplicate the problem?

Thanks and regards,
Jayant

  #5   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default Hyperlink Delete problem

Thanks for your effort.
xl2k doesnt have the option either.
For once excel is throwing a bug that is helping me. ( at least for now
;)

Regards,
Jayant



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Hyperlink Delete problem


keepITsimple..

Sub RemoveHyperlinks(rng As Range)
rng.Hyperlinks.Delete
End Sub

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


jjk wrote :

Thanks for your effort.
xl2k doesnt have the option either.
For once excel is throwing a bug that is helping me. ( at least for
now ;)

Regards,
Jayant

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 do I delete a Hyperlink in a cell Ellen Excel Worksheet Functions 2 March 16th 09 05:17 PM
Delete Web Toolbar when Open A Hyperlink workbook T_Yuri[_2_] Excel Discussion (Misc queries) 4 August 5th 08 01:06 PM
Keep hyperlink, delete graphic hmm Excel Discussion (Misc queries) 0 January 2nd 07 10:18 AM
Delete browsed pages list that appears when setting up Hyperlink Dennis Excel Discussion (Misc queries) 0 June 7th 06 01:31 AM
Delete items in Edit Hyperlink window Teatro Excel Discussion (Misc queries) 1 May 30th 05 08:26 AM


All times are GMT +1. The time now is 02:09 AM.

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

About Us

"It's about Microsoft Excel"