Thread: Protection
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Les[_4_] Les[_4_] is offline
external usenet poster
 
Posts: 21
Default Protection

Hi Sisilla

Just a wee note to let you know that I have gust recently had a
very similar problem (see: Problem with using Protect when
userinterfaceonly:=True)

Although I finally found that setting a wrongly Typed variable to
the correct Type for it's use seemed to fix my problem, you may
also be interested in comments made by Bill Lonny to my post.

Incidentally, the 'fix' I made, didn't appear to have anything at
all to do with the line prompted for debug (I had exactly same
error as you).

Bill Lonny also indicated that there was a 'known issue' regarding
your (our) problem, but I know nothing as yet about that.

regards,
--
Les Hay, Livingston. Scotland
" EZ Money" wrote in message
...
Try xlColorIndexNone

--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Sisilla" wrote in message
...
Hello There,

My macro works fine when my sheet is unprotected, but I
receive a prompt to debug when I protect the sheet. I have
unlocked the cells that have to be edited by the macro, so
I know that's not the problem. My macro changes the fill
color of some cells. When I try to run it Excel gives me
this error:

Run-time error '1004':
Unable to set the ColorIndex property of the Interior class

I am prompted to debug this line of code:
Selection.Interior.ColorIndex = xlNone

I am on Excel XP, VB6.3, and Windows 2000. I appreciate
any help.

Thnaks,
Sisilla