Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 1004: Unable to set colorindex property ...

Status
Not open for further replies.

jcarneir

Programmer
May 17, 2001
26
VE
I write a module in excel that works perfectly in excel 2000.

If I open the workbook in excel 97 I get the run-time error 1004: "Unable to set colorindex property of the font class.

The instruction is:
ActiveSheet.Cells(4, 3).Font.ColorIndex = 1

What's wrong in 97.
BTW the workbook is protected but I don't need unprotect it to change the colorindex property. If I tried to use the method unprotect I get an error too.

Any clue??
 
Another fact: The code is triggered by clicking a command button.
 
Make sure the take focus on click property of the command button is set to false Rgds
~Geoff~
 
I change this property and the code run in excel 97.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top