Microsoft Office Tutorials and References
In Depth Information
Removing Hyperlinks
In the macro TestFileExists, you can change the Path variable to point to the
file name that is to be verified. The example file is set to use the user input
method for the Path variable. Comment out the user input line (by adding an
apostrophe to the left) and uncomment out the hard-coded line (remove the
apostrophe at the left), if that is desired.
Removing Hyperlinks
These three procedures help the user remove all hyperlinks within a specific
range, within a worksheet, or within an entire workbook.
Example file:
Scenario: When data copied from the web is pasted into
Excel, the hyperlinks are usually pasted along with it.
Sometimes this is useful, but most of the time the hyperlinks
get in the way. There is not a direct way to remove the
hyperlinks from a range any larger than a single cell, which
would be a painful and slow task if many cells needed
hyperlinks removed. This macro provides an alternative for
this missing tool in Excel.
View the Appendix to learn how to store this procedure
in a Standard module.
Option Explicit¶
' * * * * *¶
Sub RemoveHyperlinksBook()¶
'Variable declarations¶
'Include charts, too¶
Dim WS As Object¶
Dim WB As Workbook¶
'Change the following variables¶
'To apply to a particular book¶
'Set WB = Workbooks("MyBook.xls")¶
'To apply to the active book¶
Set WB = ActiveWorkbook¶
For Each WS In WB.Sheets¶
Next WS¶
End Sub¶
Search JabSto ::

Custom Search