Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Changing Font Color

I have a password protected workbook. I keep getting
errors with either of the following lines.

Range("F8:F13").Font.ColorIndex = 3
Range("F8:F13").Font.Color = RGB (255,0,0)

This selection is currently white font, and upon running
the macro I would like to show it to the user (change the
font to red).

When I unprotect the workbook, the macro works fine.

TIA, Brad E.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Changing Font Color

Hi
you have to unprotect your worksheet in your macro and protect i again
afterwards. So something like
activesheet.unprotect password:="your password"
Range("F8:F13").Font.ColorIndex = 3
Range("F8:F13").Font.Color = RGB (255,0,0)
activesheet.protect password:="your password"

--
Regards
Frank Kabel
Frankfurt, Germany


Brad E wrote:
I have a password protected workbook. I keep getting
errors with either of the following lines.

Range("F8:F13").Font.ColorIndex = 3
Range("F8:F13").Font.Color = RGB (255,0,0)

This selection is currently white font, and upon running
the macro I would like to show it to the user (change the
font to red).

When I unprotect the workbook, the macro works fine.

TIA, Brad E.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing Font Color

Activesheet.Unprotect password:="ABCD"
Range("F8:F13").Font.ColorIndex = 3
Activesheet.Protect password:="ABCD"

I am sure you mean worksheet level protection as workbook level protection
should have no effect.

--
Regards,
Tom Ogilvy


"Brad E" wrote in message
...
I have a password protected workbook. I keep getting
errors with either of the following lines.

Range("F8:F13").Font.ColorIndex = 3
Range("F8:F13").Font.Color = RGB (255,0,0)

This selection is currently white font, and upon running
the macro I would like to show it to the user (change the
font to red).

When I unprotect the workbook, the macro works fine.

TIA, Brad E.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Changing Font Color

Thanks, Tom. It was the worksheet and not the workbook
that I wanted to protect.
-----Original Message-----
Activesheet.Unprotect password:="ABCD"
Range("F8:F13").Font.ColorIndex = 3
Activesheet.Protect password:="ABCD"

I am sure you mean worksheet level protection as workbook

level protection
should have no effect.

--
Regards,
Tom Ogilvy


"Brad E" wrote in message
...
I have a password protected workbook. I keep getting
errors with either of the following lines.

Range("F8:F13").Font.ColorIndex = 3
Range("F8:F13").Font.Color = RGB (255,0,0)

This selection is currently white font, and upon running
the macro I would like to show it to the user (change

the
font to red).

When I unprotect the workbook, the macro works fine.

TIA, Brad E.

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
Changing font style and color using VBA Spongie Excel Discussion (Misc queries) 3 September 30th 09 08:34 PM
Changing font color if conditions are met Bob Excel Worksheet Functions 4 November 11th 08 07:48 PM
Font color changing by itself EJamison Excel Discussion (Misc queries) 2 September 18th 08 05:34 PM
Changing Font color based on font type or size John Excel Discussion (Misc queries) 2 February 7th 08 12:50 AM
Changing Font Color bagoxc Excel Discussion (Misc queries) 2 July 17th 06 01:14 AM


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