Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 84
Default change all of the same fill colors in a worksheet

I like to try various fill colors in presentations. Can I change all of the
same fill colors in aworksheet at the same time?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default change all of the same fill colors in a worksheet

Hi Bob,

It's not very elegant but you can do a global change by
going to ToolsOptionsColor Tab then click on a color
square and click modify. This will change any cell using that
tab to whatever you like.

There is probably a way to pre-set this sort of funcionality
with VBA but it would need to be something that is set up
for your individual needs rather than a cure-all that will work
in any situation.

I know virtually nothing about VBA but it might be worth
posting a question in the programming newsgroup.

HTH
Martin


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default change all of the same fill colors in a worksheet

Here is code to follow that route

Sub Macro1()
Dim iOldCI As Long
Dim iNewCI As Long
With ActiveCell.Interior
If .ColorIndex < xlColorIndexNone Then
iOldCI = .Color
ActiveWorkbook.Colors(.ColorIndex) = GetColor()
End If
End With
End Sub

'-----------------------------*------------------------------*--------------
Function GetColor(Optional Text As Boolean = False) As Long
'-----------------------------*------------------------------*--------------
Dim rngCurr As Range
Dim prev As Worksheet
Dim sh As Worksheet
Set prev = ActiveWorkbook.ActiveSheet
Set rngCurr = Selection
Set sh = ActiveWorkbook.Worksheets.Add
Application.ScreenUpdating = False
With sh
.Range("IV1").Select
Application.Dialogs(xlDialogPatterns).Show
GetColor = ActiveCell.Interior.Color
If GetColor = xlColorIndexAutomatic And Not Text Then
GetColor = xlColorIndexNone
End If
ActiveCell.Interior.ColorIndex = xlColorIndexAutomatic
prev.Activate
rngCurr.Select
Set rngCurr = ActiveSheet.UsedRange
End With
Application.DisplayAlerts = False
sh.Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Function

"MartinW" wrote in message
...
Hi Bob,

It's not very elegant but you can do a global change by
going to ToolsOptionsColor Tab then click on a color
square and click modify. This will change any cell using that
tab to whatever you like.

There is probably a way to pre-set this sort of funcionality
with VBA but it would need to be something that is set up
for your individual needs rather than a cure-all that will work
in any situation.

I know virtually nothing about VBA but it might be worth
posting a question in the programming newsgroup.

HTH
Martin



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
How to Automatically Change Fill Colors Daniel Bunt Excel Discussion (Misc queries) 4 October 28th 08 12:51 PM
Cell fill colors in Excel change when copying to a new book jkbond67 Excel Discussion (Misc queries) 2 July 31st 06 09:47 PM
how to change colors in fill menu (Excel) rp Excel Discussion (Misc queries) 2 April 17th 06 11:24 PM
Can I change the colors in the fill color chart? Genesis Pat Excel Discussion (Misc queries) 2 March 28th 06 07:51 PM
I cannot see my fill colors on the worksheet? VikingsFan Excel Discussion (Misc queries) 1 July 17th 05 06:31 PM


All times are GMT +1. The time now is 11:22 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"