#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Protection

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Protection

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   Report Post  
Posted to microsoft.public.excel.programming
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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Never Mind (Silly Me!)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Never Mind (Silly Me!)

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
WS Protection: Different Levels of Protection on Different Ranges Carmi Excel Discussion (Misc queries) 4 August 31st 07 02:26 PM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM


All times are GMT +1. The time now is 09:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"