Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Cow
 
Posts: n/a
Default Excel 2003 Macro Error - Runtime error 1004

Hi there,

I had an Excel Macro program which was running very well in Office 97. But
after I had upgraded my Office 97 to Office 2003, I could not run part of the
program. I got the following error when trying to run the macro"
Run-time Error '1004' Unable to set the colorIndex property of the Font Class.

I noticed that the worksheet is actually write-protected. and if I try to
unprotect the worksheet and re-run the macro, it runs well...
Could anybody help me in this. Thanks a zillion
  #2   Report Post  
Bob Umlas
 
Posts: n/a
Default

Office 2003 is more strict than earlier versions. You're going to have to
unprotect the sheet in the code:
Activesheet.unprotect
Range("Whataver").Font.Colorindex = ....
ActiveSheet.Protect

If there's a password, include it in the unprotect/protect lines
(Activesheet.unprotect "xyz")

Bob Umlas
Excel MVP

"Cow" wrote in message
...
Hi there,

I had an Excel Macro program which was running very well in Office 97.

But
after I had upgraded my Office 97 to Office 2003, I could not run part of

the
program. I got the following error when trying to run the macro"
Run-time Error '1004' Unable to set the colorIndex property of the Font

Class.

I noticed that the worksheet is actually write-protected. and if I try to
unprotect the worksheet and re-run the macro, it runs well...
Could anybody help me in this. Thanks a zillion



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

Maybe your macro should unprotect the worksheet, change the colors and then
reprotect the worksheet.

Cow wrote:

Hi there,

I had an Excel Macro program which was running very well in Office 97. But
after I had upgraded my Office 97 to Office 2003, I could not run part of the
program. I got the following error when trying to run the macro"
Run-time Error '1004' Unable to set the colorIndex property of the Font Class.

I noticed that the worksheet is actually write-protected. and if I try to
unprotect the worksheet and re-run the macro, it runs well...
Could anybody help me in this. Thanks a zillion


--

Dave Peterson
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
LINEST bug with cubic polynomials in Excel 2003 byundt Excel Worksheet Functions 3 March 21st 05 03:15 PM
macro in excel 2003 constance Excel Worksheet Functions 1 March 21st 05 10:50 AM
update row numbers after different active cells in macros followi. LMIV Excel Discussion (Misc queries) 11 February 16th 05 01:44 AM
sharing/using/saving Excel 2002 files in Excel 2003 maze2009 Excel Discussion (Misc queries) 0 January 20th 05 08:27 PM
how to increase maximum number of columns in excel 2003 [email protected] Excel Discussion (Misc queries) 1 January 16th 05 09:13 PM


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