Remove Hyperlinks

E

Elaine

Hello,

I'm using Excel 2007 and want to remove hyperlinks from a multiple cells. I
got the following code from the "General" user group and it doesn't work for
me. Can you tell me what I'm doing wrong?

I pressed Alt + F11, then Ctrl + G, and pasted the following code:

Sub
'
' Macro2 Macro
'

'
Cells.Select
Sub DelAllHyperlinks()
ActiveSheet.Hyperlinks.Delete
End Sub
 
J

jasontferrell

Press Alt-F11
Press Ctrl-G

Paste just this one line.

ActiveSheet.Hyperlinks.Delete

After you paste it, the cusor will move to the next blank line. Move
the cursor back up to the end of the line you pasted so that it's
flashing after "Delete". Then press enter. This should run the code
on the worksheet that you have active.
 
S

stanleydgromjr

Elaine,

Try:


PLEASE TEST THIS FIRST IN A COPY OF YOUR WORKBOOK (ALWAYS MAKE A BACKUP
COPY BEFORE TRYING NEW CODE, YOU NEVER KNOW WHAT YOU MIGHT LOSE).

Adding the Macro
1. Copy the below macro, by highlighting the macro code and pressing
the keys *CTRL* + *C*
2. Open your workbook
3. Press the keys ALT+F11 to open the Visual Basic Editor
4. Press the keys ALT+I to activate the Insert menu
5. Press M to insert a Standard Module
6. Paste the code by pressing the keys *CTRL* + *V*
7. Press the keys ALT+Q to exit the Editor, and return to Excel


Code:
--------------------


Sub DelAllHyperlinks()

ActiveSheet.Cells.Hyperlinks.Delete

End Sub


--------------------



Have a great day,
Stan
 
E

Elaine

All I can say is that both of you are GREAT!

Thank you for your quick response to my question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top