Setting default font color

D

Dave

How can I set the font color. I have worksheets with the standard black
font. It would be handy to change to font color so that any dew data or
overwrites I enter would be in another color. Must be a way to do this, but
I haven't found it.
Appreciate any suggestions.

Dave
 
S

Shane Devenshire

Hi,

What exactly do you mean by dew data?

Your subject line says you want to change the default font. You can do that
for the current sheet by selecting the whole sheet and picking a font color.
In 2007 you can create a custom Theme with a different default color.

You can also use a change event to change the color of the font anytime a
specific cell(s) are changed. But this requires VBA.

Here is some sample code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1"))
If Not isect Is Nothing Then
'Your code here
End If
End Sub
 
D

Dave

Sorry Shane - let me start over

First of all, my original message got posted accidentally - 'dew' was a typo
for 'new'
Let's say I have a worksheet full of data, all in black fonts

I would like to type in some updated numbers, but I would like them to be
entered in some other color just so I can see what has changed.

I do not want to change all the existing data on the page, just the changed
data, as I type it in

Dave
WinXP SP2 Office(Excel)2003
 
G

Gord Dibben

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
On Error GoTo CleanUp
Application.EnableEvents = False
With Target
If .Value <> "" Then
.Font.ColorIndex = 3
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub

Right-click the sheet tab and "View Code". Copy/paste into that module.

Alt + q to return to the Excel window.

Any new entries or edited entries will be in red font.


Gord Dibben MS Excel MVP
 
D

Dave

Thank you Gord -
Unfortunately, I have no idea what you are suggestion -
Let's all forget the whole thing.. Next time I see Bill Gates I'll mention
it :)
Dave
 
G

Gord Dibben

Don't give up yet<g>

Did you read my instructions about where to place the code?

A "sheet tab" is the tab at bottom with the sheet name on it, like Sheet1,
Sheet2 etc.

Right-click is using the right-hand mouse button and clicking on the sheet
tab you want the code to run in.

Copy is to select and copy the code text from my post including and between
these two lines

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Paste is to paste into the code window that opens when you select "View
Code"

Alt + q is to hold the Alt key and hit "q" on the keyboard.


Gord
 
D

Dave

Gord -
Talked to Bill Gates - said to talk to you instead, he was busy :)

#1) My humble apologies for being curt - it was not a good day!
#2) Did as you instructed, it worked. I'm impressed
#3) I have no idea what I just did, other than to note it was MS Visual
Basic.
#4) Having spent many years (and many years ago) on GE 'Basic', Fortran,
etc, The Visual Basic thing never demonstrated anything resembling logic, at
least to me. Probably puts me in the minority. I am comfortable with
Macros, just not VB I guess.
#5) Returning to my test data, my worksheet didn't like my Security setting.
Tried all the way down to 'Low' - no joy
#6) Can you direct me to ONE good beginning reference to START to learn VB.
Guess it's time :-(
#7) Let me repeat my apologies for being abrupt, and applaud you tenacity
while I'm at it.

Everything much appreciated
Your humble servant (like you need me)
Dave
 
G

Gord Dibben

See in-line responses.

Gord -
Talked to Bill Gates - said to talk to you instead, he was busy :)

#1) My humble apologies for being curt - it was not a good day!

We all get those days.
#2) Did as you instructed, it worked. I'm impressed
#3) I have no idea what I just did, other than to note it was MS Visual
Basic.

Actually it is Visual Basic for Applications......VBA..........that Office
applications employ.
#4) Having spent many years (and many years ago) on GE 'Basic', Fortran,
etc, The Visual Basic thing never demonstrated anything resembling logic, at
least to me. Probably puts me in the minority. I am comfortable with
Macros, just not VB I guess.

What I posted is VBA event code.

Basically the same as a "macro" but triggered by an event rather than
manually.
#5) Returning to my test data, my worksheet didn't like my Security setting.
Tried all the way down to 'Low' - no joy

If running Excel 2007 you must save the workbook as xlsm..............macro
enabled workbook.
#6) Can you direct me to ONE good beginning reference to START to learn VB.
Guess it's time :-(

David McRitchie's site has a "getting started" page with links to other
sites.
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Also for events...........

http://www.mvps.org/dmcritchie/excel/event.htm

Ron de Bruin's site for where to put the differing types of VBA
code..................

http://www.rondebruin.nl/code.htm
 
K

Ken Detweiler

It's unbelievable that you have to jump through these hoops to do a simple thing like change the default font color.



Gord Dibben wrote:

Re: Setting default font color
26-Jan-09

See in-line responses


We all get those days

Actually it is Visual Basic for Applications......VBA..........that Offic
applications employ

What I posted is VBA event code

Basically the same as a "macro" but triggered by an event rather tha
manually

If running Excel 2007 you must save the workbook as xlsm..............macr
enabled workbook

David McRitchie's site has a "getting started" page with links to othe
sites
http://www.mvps.org/dmcritchie/excel/getstarted.ht

Also for events..........

http://www.mvps.org/dmcritchie/excel/event.ht

Ron de Bruin's site for where to put the differing types of VB
code.................

http://www.rondebruin.nl/code.ht


Gord

Previous Posts In This Thread:

Setting default font color
How can I set the font color. I have worksheets with the standard black
font. It would be handy to change to font color so that any dew data or
overwrites I enter would be in another color. Must be a way to do this, but
I haven't found it
Appreciate any suggestions

Dave

Re: Setting default font color
Sorry, forgot to mentio
WinXP SP2 Excel (Office)200

Dave

Hi,What exactly do you mean by dew data?
Hi

What exactly do you mean by dew data?

Your subject line says you want to change the default font. You can do that
for the current sheet by selecting the whole sheet and picking a font color.
In 2007 you can create a custom Theme with a different default color

You can also use a change event to change the color of the font anytime a
specific cell(s) are changed. But this requires VBA

Here is some sample code

Private Sub Worksheet_Change(ByVal Target As Range
Dim isect As Rang
Set isect = Application.Intersect(Target, Range("A1")
If Not isect Is Nothing The
'Your code her
End I
End Su

--
If this helps, please click the Yes butto

Cheers
Shane Devenshir

:

Sorry Shane - let me start overFirst of all, my original message got posted
Sorry Shane - let me start ove

First of all, my original message got posted accidentally - 'dew' was a typo
for 'new
Let's say I have a worksheet full of data, all in black font

I would like to type in some updated numbers, but I would like them to be
entered in some other color just so I can see what has changed

I do not want to change all the existing data on the page, just the changed
data, as I type it i

Dav
WinXP SP2 Office(Excel)200


message
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.
Private Sub Worksheet_Change(ByVal Target As Range
If Target.Cells.Count > 1 Then Exit Su
On Error GoTo CleanU
Application.EnableEvents = Fals
With Targe
If .Value <> "" The
.Font.ColorIndex =
End I
End Wit
CleanUp
Application.EnableEvents = Tru
End Su

Right-click the sheet tab and "View Code". Copy/paste into that module

Alt + q to return to the Excel window

Any new entries or edited entries will be in red font

Gord Dibben MS Excel MV


Thank you Gord -Unfortunately, I have no idea what you are suggestion -Let's
Thank you Gord
Unfortunately, I have no idea what you are suggestion
Let's all forget the whole thing.. Next time I see Bill Gates I'll mention
it :-
Dav

"Gord Dibben" <gorddibbATshawDOTca> wrote in message

Don't give up yet<g>Did you read my instructions about where to place the code?
Don't give up yet<g>

Did you read my instructions about where to place the code?

A "sheet tab" is the tab at bottom with the sheet name on it, like Sheet1,
Sheet2 etc.

Right-click is using the right-hand mouse button and clicking on the sheet
tab you want the code to run in.

Copy is to select and copy the code text from my post including and between
these two lines

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Paste is to paste into the code window that opens when you select "View
Code"

Alt + q is to hold the Alt key and hit "q" on the keyboard.


Gord


Re: Setting default font color
Gord -
Talked to Bill Gates - said to talk to you instead, he was busy :)

Basic.
etc, The Visual Basic thing never demonstrated anything resembling logic, at
least to me. Probably puts me in the minority. I am comfortable with
Macros, just not VB I guess.
Tried all the way down to 'Low' - no joy
Guess it's time :-(
while I'm at it.

Everything much appreciated
Your humble servant (like you need me)
Dave


"Gord Dibben" <gorddibbATshawDOTca> wrote in message

Re: Setting default font color
See in-line responses.



We all get those days.


Actually it is Visual Basic for Applications......VBA..........that Office
applications employ.


What I posted is VBA event code.

Basically the same as a "macro" but triggered by an event rather than
manually.


If running Excel 2007 you must save the workbook as xlsm..............macro
enabled workbook.


David McRitchie's site has a "getting started" page with links to other
sites.
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Also for events...........

http://www.mvps.org/dmcritchie/excel/event.htm

Ron de Bruin's site for where to put the differing types of VBA
code..................

http://www.rondebruin.nl/code.htm



Gord


Submitted via EggHeadCafe - Software Developer Portal of Choice
SharePoint - Managing Unused or Archive sites automatically
http://www.eggheadcafe.com/tutorial...5b-a2a8deb60cad/sharepoint--managing-unu.aspx
 
D

Dyfed Griffiths

Hi Gord,

I have used the VBA successfully, but after saving the file as xlsm, the next time I open it the script doesn't work. It is still there in Show Code,but any new typing just stays at the default black.
Saving without macros and then pasting back the script works fine of course.
(Opening the xlsm file, I do not get asked about enabling macros).
What am I doing wrong?

Dyfed




Gord Dibben wrote:

Re: Setting default font color
26-Jan-09

See in-line responses.



We all get those days.


Actually it is Visual Basic for Applications......VBA..........that Office
applications employ.


What I posted is VBA event code.

Basically the same as a "macro" but triggered by an event rather than
manually.


If running Excel 2007 you must save the workbook as xlsm..............macro
enabled workbook.


David McRitchie's site has a "getting started" page with links to other
sites.
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Also for events...........

http://www.mvps.org/dmcritchie/excel/event.htm

Ron de Bruin's site for where to put the differing types of VBA
code..................

http://www.rondebruin.nl/code.htm



Gord

Previous Posts In This Thread:

Setting default font color
How can I set the font color. I have worksheets with the standard black
font. It would be handy to change to font color so that any dew data or
overwrites I enter would be in another color. Must be a way to do this, but
I haven't found it.
Appreciate any suggestions.

Dave

Re: Setting default font color
Sorry, forgot to mention
WinXP SP2 Excel (Office)2003

Dave

Hi,What exactly do you mean by dew data?
Hi,

What exactly do you mean by dew data?

Your subject line says you want to change the default font. You can do that
for the current sheet by selecting the whole sheet and picking a font color.
In 2007 you can create a custom Theme with a different default color.

You can also use a change event to change the color of the font anytime a
specific cell(s) are changed. But this requires VBA.

Here is some sample code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1"))
If Not isect Is Nothing Then
'Your code here
End If
End Sub

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


:

Sorry Shane - let me start overFirst of all, my original message got posted
Sorry Shane - let me start over

First of all, my original message got posted accidentally - 'dew' was a typo
for 'new'
Let's say I have a worksheet full of data, all in black fonts

I would like to type in some updated numbers, but I would like them to be
entered in some other color just so I can see what has changed.

I do not want to change all the existing data on the page, just the changed
data, as I type it in

Dave
WinXP SP2 Office(Excel)2003



message
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
On Error GoTo CleanUp
Application.EnableEvents = False
With Target
If .Value <> "" Then
.Font.ColorIndex = 3
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub

Right-click the sheet tab and "View Code". Copy/paste into that module.

Alt + q to return to the Excel window.

Any new entries or edited entries will be in red font.


Gord Dibben MS Excel MVP


Thank you Gord -Unfortunately, I have no idea what you are suggestion -Let's
Thank you Gord -
Unfortunately, I have no idea what you are suggestion -
Let's all forget the whole thing.. Next time I see Bill Gates I'll mention
it :)
Dave

"Gord Dibben" <gorddibbATshawDOTca> wrote in message

Don't give up yet<g>Did you read my instructions about where to place the code?
Don't give up yet<g>

Did you read my instructions about where to place the code?

A "sheet tab" is the tab at bottom with the sheet name on it, like Sheet1,
Sheet2 etc.

Right-click is using the right-hand mouse button and clicking on the sheet
tab you want the code to run in.

Copy is to select and copy the code text from my post including and between
these two lines

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Paste is to paste into the code window that opens when you select "View
Code"

Alt + q is to hold the Alt key and hit "q" on the keyboard.


Gord


Re: Setting default font color
Gord -
Talked to Bill Gates - said to talk to you instead, he was busy :)

Basic.
etc, The Visual Basic thing never demonstrated anything resembling logic, at
least to me. Probably puts me in the minority. I am comfortable with
Macros, just not VB I guess.
Tried all the way down to 'Low' - no joy
Guess it's time :-(
while I'm at it.

Everything much appreciated
Your humble servant (like you need me)
Dave


"Gord Dibben" <gorddibbATshawDOTca> wrote in message

Re: Setting default font color
See in-line responses.



We all get those days.


Actually it is Visual Basic for Applications......VBA..........that Office
applications employ.


What I posted is VBA event code.

Basically the same as a "macro" but triggered by an event rather than
manually.


If running Excel 2007 you must save the workbook as xlsm..............macro
enabled workbook.


David McRitchie's site has a "getting started" page with links to other
sites.
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Also for events...........

http://www.mvps.org/dmcritchie/excel/event.htm

Ron de Bruin's site for where to put the differing types of VBA
code..................

http://www.rondebruin.nl/code.htm



Gord

default font color
It's unbelievable that you have to jump through these hoops to do a simple thing like change the default font color.


Submitted via EggHeadCafe - Software Developer Portal of Choice
LINQ With Strings
http://www.eggheadcafe.com/tutorial...47db-adb9-db7fe2c6ab8c/linq-with-strings.aspx
 
G

Gord Dibben

Check your security settings.

Button>Excel Options>Trust Center.

You can set macro security to disable with notification or add the folder
with your file to "Trusted Locations"


Gord
 
D

Dyfed Griffiths

Must have been half asleep, it was just the MS macro protection

Cheers



Dyfed Griffiths wrote:

Setting default font color and keeping the funcionality after saving
31-May-10

Hi Gord,

I have used the VBA successfully, but after saving the file as xlsm, the next time I open it the script doesn't work. It is still there in Show Code,but any new typing just stays at the default black.
Saving without macros and then pasting back the script works fine of course.
(Opening the xlsm file, I do not get asked about enabling macros).
What am I doing wrong?

Dyfed

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
LINQ With Strings
http://www.eggheadcafe.com/tutorial...47db-adb9-db7fe2c6ab8c/linq-with-strings.aspx
 
B

bimal sengupta

Dear Sir,
Thanks you! it was helpful I was asking everybody how to change the color of the fonts when I do revision.
now I have new request, am doing leave schedule for my staff in excel 2003. In column C1 I have employee arrival date then next column D1 I have number of days he needs to work say 156, then next E1 column next date for his vacation due should come.
Kindly help
Regards
Bimal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top