XL97: Borders Removed When You Remove Hyperlink from a Cell

ID: Q185158

The information in this article applies to:

SYMPTOMS

In Microsoft Excel 97 for Windows, if you remove a hyperlink from a cell in a worksheet, borders applied to the cell may also be removed.

CAUSE

This problem will occur if you click the Remove Link button in the Edit Hyperlink dialog box or if you use the Delete method in a Visual Basic macro to delete a hyperlink, as in the following example:

   ActiveCell.Hyperlinks.Delete

WORKAROUND

To manually remove a hyperlink from a cell without removing the cell's borders, follow these steps:

1. By using the arrow keys on the keyboard, select the cell. (Note that if

   you click the cell, the hyperlink is activated.)

2. Press the DELETE key to clear the cell's contents and remove the
   hyperlink.

You can also use one of the following lines of Visual Basic code to remove a hyperlink from a cell without removing the cell's borders:

   ActiveCell.Hyperlinks(1).Range = ""

   Range("B5").Hyperlinks(1).Range = ""

By setting the Range for the hyperlink to a blank string (""), you can effectively remove the hyperlink without actually deleting it.

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Excel listed at the beginning of this article.

MORE INFORMATION

In Microsoft Excel 97 for Windows, you can add a hyperlink to a cell by clicking Hyperlink on the Insert menu. Hyperlinks can link to Web pages, other workbooks or documents, or other locations within the same workbook.

You can remove a hyperlink from a cell by clicking the Remove Link button in the Edit Hyperlink dialog box. If you click this button, or if you use the Delete method in a Visual Basic macro to delete a hyperlink, borders applied to the cell are removed.

Additional query words: XL97

Keywords          : kbweb xlvbainfo xlformat 
Version           : WINDOWS:97
Platform          : WINDOWS
Issue type        : kbbug

Last Reviewed: November 2, 1998