A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Excel 2003 Macro Error - Runtime error 1004



 
 
Thread Tools Display Modes
  #1  
Old June 7th, 2005, 10:51 AM
Cow
external usenet poster
 
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
Ads
  #2  
Old June 7th, 2005, 01:17 PM
Bob Umlas
external usenet poster
 
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  
Old June 7th, 2005, 01:40 PM
Dave Peterson
external usenet poster
 
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
  #4  
Old November 21st, 2010, 10:43 PM
speedypcnet speedypcnet is offline
Member
 
First recorded activity by OfficeFrustration: Nov 2010
Posts: 1
Thumbs up

Quote:
Originally Posted by Cow View Post
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
Hi,

The most common Runtime Error is 1004. This error is very generic and is often used to describe a variety of different errors. As such, when you see the Runtime Error 1004, it could be caused by any number of things, just in Microsoft Office.

You can fix this runtime problem on your own within your Windows system. Follow the instructions below:

- Select the "Start" button.
- Choose "Explorer" from the menu provided.
- Open C:\Program Files\MSOffice\Office\XLSTART
- Remove, or delete, the file that is called GWXL97.XLA
- Close Explorer and open Microsoft Excel.
- Excel should open and run without problems.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
macro in excel 2003 constance Worksheet Functions 1 March 21st, 2005 09:50 AM
Windows in Taskbar Chevy General Discussion 8 October 15th, 2004 03:57 PM
Including Subfolders for use within Word 2003 Macro helpserv General Discussion 7 October 6th, 2004 04:38 AM
Ctrl+A macro fix for problem in Excel 2003 David McRitchie General Discussion 4 June 19th, 2004 12:01 PM
Excel 2003 swedish renames macro name Anton Worksheet Functions 0 December 16th, 2003 09:06 PM


All times are GMT +1. The time now is 05:15 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2004-2017 OfficeFrustration.
The comments are property of their posters.