Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing font style and color using VBA | Excel Discussion (Misc queries) | |||
Changing font color if conditions are met | Excel Worksheet Functions | |||
Font color changing by itself | Excel Discussion (Misc queries) | |||
Changing Font color based on font type or size | Excel Discussion (Misc queries) | |||
Changing Font Color | Excel Discussion (Misc queries) |