Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel should allow me to delete all hyperlinks at once | Excel Discussion (Misc queries) | |||
Trendline erases chart name | Charts and Charting in Excel | |||
Excel erases the "To:" field when emailing | Excel Discussion (Misc queries) | |||
Clicking the text in a textbox erases all the data in the box | Excel Programming | |||
Hyperlinks.Delete without losing formatting? | Excel Programming |