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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
Quote:
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 | |
|
|
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 |