LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JCO JCO is offline
external usenet poster
 
Posts: 54
Default Remove Hyperlinks Without Changing background shading

I have many workbooks and sheets that I need to remove the hyperlinks from.
When doing the code below, it removes all formatting.

Sub RemoveHyperlinks()
Selection.Hyperlinks().Delete
End Sub

The issue is that it changes all the fonts boarders and many of the cells
have different color background shadings (fill). So I turned the "Record
Macro" on and was able to modify the Macro by reapplying the font name, font
size, font color, cell boarders.

Sub RemoveHyperlinksOnly()
Selection.Hyperlinks().Delete

' Set new font name
--code--
' Set new font size
--code--
' Set new font color
--code--
' Set boarders
--code--
End Sub


However, the "Format CellFillColor" of many cells are Green, Red, Yellow &
Pink

I know I can use format painter and do these separately but I have many of
these to do on an ongoing basis. The Excel Workbooks are given to me so I
have to make the changes to 8-12 sheets out of 15 sheets total. I need a
way to add to my existing macro to take a cell and do the following:

Sub RemoveHyperlinksOnly()
1 store existing "Format CellFillColor" in a variable
2 do my existing macro
3 change "Format CellFillColor" to the variable that was stored
End Sub

Any help is appreciated. I suspect it is easy to do but I don't deal with
macros much.



 
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 2003 bank ledger spreadsheet background fill shading Dan Excel Worksheet Functions 4 December 3rd 08 11:22 AM
How do I fix the background shading by position? John Gregory Excel Discussion (Misc queries) 2 September 10th 07 07:08 PM
Excel Background Shading SmokeyMo Excel Discussion (Misc queries) 6 July 25th 07 08:23 PM
Restoring Excel gridlines after removing background shading? Wisconsin Jon Excel Discussion (Misc queries) 2 June 18th 07 09:09 PM
Background Cell shading colors Dean[_8_] Excel Programming 4 February 2nd 06 02:14 PM


All times are GMT +1. The time now is 03:36 AM.

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"