Excel 2000! Can you change cell colors during run time.

bandit_1981

Board Regular
Joined
Aug 17, 2005
Messages
201
I created my project in excel 2002 and all was nice in the world but then they wanted it to work in excel 200. It found the references it need minus the run time which i ran msorun.exe and installed it. I refernece it and it still crashes when it tries to change the cell bakground color while running. Any ideas?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Can we see the code?

How is it crashing?

Are you getting any error messages?

I believe there is some incompatibilty between the 2 versions.

By the way, if you are creating code etc for different versions you should try, if possible, to develop it on the earliest version.
 
Upvote 0
Yeah at firs they wanted 2002 now 2000 so i cleared ou tmy machine and put 2000 on it now i am having loads of fun.

Error Number 1004 runtime error
Error Message: Unable to set Color Index property of the Interior class.

Code it crashes on: ThisWorkbook.Worksheets("Demographics").Range("D7:K7").Interior.ColorIndex = 15
 
Upvote 0
I think i am somewhat lucky most of my code works only the code that deals with color changes are broken.
 
Upvote 0
Weird!

I don't see any problem with that code, certainly nothing that could be caused by the different versions.

What happens when you change the 15?

Has anything else changed in your setup?
 
Upvote 0
It crashes even if i change the 15. The only setup changes I had was getting ride of 2002 and putting on 2000. So i am at a fresh install maybe i should atleast put SP1 for office on it? It appears to be getting confused with the cell background i can get my font to change on the fly although it doesnt understand the colors i had picked and is guessing and doing badly at it.
 
Upvote 0
Ok i found out what was happening. In the 2002 version i have all the sheets protected but under the protection tab i allow for cell formating. When they workbook it loaded in 2000 you only have 3 options. It checks them all by defualt. Even if i only check content the protection still will not allow me to change the color during run time. If i unprotect it she works like a charm. I guess 2002 made many improvements as far as optional cell protection goes.
 
Upvote 0
The only question i have is why am i able to set the font to different colors when the sheet is protected just not the cell background color. I would think the protection would cover them both but it does not appear to.
 
Upvote 0

Forum statistics

Threads
1,225,847
Messages
6,187,367
Members
453,420
Latest member
ESCH1021

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top