Deactivate all the hyperlinks in an entire workbook?

V

VBA Noob

Think this might work

Sub DelAllHyperlinks()

Dim WS_Count As Integer
Dim I As Integer

WS_Count = ActiveWorkbook.Worksheets.Count

For I = 1 To WS_Count

Sheets(I).Hyperlinks.Delete
Next I

End Sub

VBA Nob
 
G

Gord Dibben

Sub Delete_Hyperlinks()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).UsedRange.Cells.Hyperlinks.Delete
Next n
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
S

SouthAfricanStan

Thanks so far.
I'm a newby as far as this part of excel is concerned.
Please advise me (key by key) how to do this, or perhaps there are relevant
tutorials available on the internet?
 
G

Gord Dibben

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to Tool>Macro>Macros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


Thanks so far.
I'm a newby as far as this part of excel is concerned.
Please advise me (key by key) how to do this, or perhaps there are relevant
tutorials available on the internet?

Gord Dibben MS Excel MVP
 
S

SouthAfricanStan

Thank You!

Gord Dibben said:
If not familiar with VBA and macros, see David McRitchie's site for more
on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to Tool>Macro>Macros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP




Gord Dibben MS Excel MVP
 
Top