Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't know why I didn't think of this before! I will set
the macro to unprotect the sheet before it is run, and protect the sheet after it's run! Thanks Anyway, Sisilla -----Original 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 . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sisilla, in the interest of keeping the thread together, it is best to
simply Reply Group to the thread. In that way, the thread can be followed to its conclusion. By starting a new thread revealing your Eureka! moment, no one will see, by following the thread, that you have found a resolution. All the best. -- Greeting from the Gulf Coast! http://myweb.cableone.net/twodays "Sisilla" wrote in message ... I don't know why I didn't think of this before! I will set the macro to unprotect the sheet before it is run, and protect the sheet after it's run! Thanks Anyway, Sisilla -----Original 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Protection Best Practice: AKA: Real Sheet Protection | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
WS Protection: Different Levels of Protection on Different Ranges | Excel Discussion (Misc queries) | |||
Cell Protection vs. Worksheet Protection | Excel Discussion (Misc queries) | |||
Worksheet protection is gone and only wokbook protection can be se | Excel Discussion (Misc queries) |