Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hyperlinks.Delete erases cell formatting

Using the Hyperlinks.Delete method wipes out all of the formatting in
the affected cells. I'm sure I could write a macro that reformats the
cells,but the workbooks involved are quite large and I need to do this as part
of a mulit-user web application. Considering how slow Excel is at cell
formatting, I don't think this is a good idea.

I was wondering if there is a fast way to fix this or if newer versions
f Excel have this bug fixed (I am using Excel 2000 currently).

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Hyperlinks.Delete erases cell formatting

Glen,

The following works almost instantly, as all operations are on the entire range...
'---------------------------------------------------------
Sub CleanItUp()
'Removes Hyperlink objects from designated range.
'Jim Cone - December 16, 2004
Dim varCellValue As Variant
Dim rngHyperArea As Excel.Range

Set rngHyperArea = Range("B8:G200")

varCellValue = rngHyperArea.Value
rngHyperArea.ClearContents
rngHyperArea.Value = varCellValue
rngHyperArea.Font.Underline = xlUnderlineStyleNone
rngHyperArea.Font.ColorIndex = xlColorIndexAutomatic

Set rngHyperArea = Nothing
End Sub
'------------------------------------------------

Jim Cone
San Francisco, USA

"Glen K" wrote in message ...
Using the Hyperlinks.Delete method wipes out all of the formatting in
the affected cells. I'm sure I could write a macro that reformats the
cells,but the workbooks involved are quite large and I need to do this as part
of a mulit-user web application. Considering how slow Excel is at cell
formatting, I don't think this is a good idea.
I was wondering if there is a fast way to fix this or if newer versions
f Excel have this bug fixed (I am using Excel 2000 currently).


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Hyperlinks.Delete erases cell formatting

That seems to do the trick, thanks.

On Thu, 16 Dec 2004 16:14:34 -0800, Jim Cone wrote:

Glen,

The following works almost instantly, as all operations are on the entire range...
'---------------------------------------------------------
Sub CleanItUp()
'Removes Hyperlink objects from designated range.
'Jim Cone - December 16, 2004
Dim varCellValue As Variant
Dim rngHyperArea As Excel.Range

Set rngHyperArea = Range("B8:G200")

varCellValue = rngHyperArea.Value
rngHyperArea.ClearContents
rngHyperArea.Value = varCellValue
rngHyperArea.Font.Underline = xlUnderlineStyleNone
rngHyperArea.Font.ColorIndex = xlColorIndexAutomatic

Set rngHyperArea = Nothing
End Sub
'------------------------------------------------

Jim Cone
San Francisco, USA

"Glen K" wrote in message ...
Using the Hyperlinks.Delete method wipes out all of the formatting in
the affected cells. I'm sure I could write a macro that reformats the
cells,but the workbooks involved are quite large and I need to do this as part
of a mulit-user web application. Considering how slow Excel is at cell
formatting, I don't think this is a good idea.
I was wondering if there is a fast way to fix this or if newer versions
f Excel have this bug fixed (I am using Excel 2000 currently).


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
Excel should allow me to delete all hyperlinks at once Rajasekhar Koduru Excel Discussion (Misc queries) 2 June 28th 06 07:05 PM
Trendline erases chart name jase Charts and Charting in Excel 1 June 21st 06 11:30 PM
Excel erases the "To:" field when emailing Mike M. Excel Discussion (Misc queries) 2 September 26th 05 01:24 PM
Clicking the text in a textbox erases all the data in the box dok112[_20_] Excel Programming 4 July 27th 04 01:26 PM
Hyperlinks.Delete without losing formatting? Lisa[_10_] Excel Programming 4 July 24th 04 12:16 AM


All times are GMT +1. The time now is 11:50 PM.

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

About Us

"It's about Microsoft Excel"