Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default problem with interior.colorindex

Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
..offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default problem with interior.colorindex

On reason would be the sheet is protected. You say it isn't, but that is
really the only reason I can think of

If you are using xl97, then at the top of the code put in

ActiveCell.Activate

--
Regards,
Tom Ogilvy

"Peter Rooney" wrote in message
...
Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
.offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default problem with interior.colorindex

I'm going to be no help, it worked fine for me. The only way I could get it
to fail was if there were less than 9 cells to the right of Target, that is
it was trying to resize off the edge.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Peter Rooney" wrote in message
...
Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
.offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default problem with interior.colorindex

Please ignore me - elsewhere in my worksheet_change, some cell validation was
set - which of course was a change, which re-invoked the worksheet_change
macro...which.. er... re-activated the worksheet protection at the end!
Doh!

Sorry to waste your time.

Pete



"Peter Rooney" wrote:

Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
.offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default problem with interior.colorindex

Hi Pete,

Works fine for me, assuming target is not in the right-most 10 columns.

Not sure the purpose of .Offset(0,0)

Regards,
Peter T

"Peter Rooney" wrote in message
...
Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
.offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default problem with interior.colorindex

Bob, Sorry to waste your time, it WAS protection related.

Thanks

Pete



"Bob Phillips" wrote:

I'm going to be no help, it worked fine for me. The only way I could get it
to fail was if there were less than 9 cells to the right of Target, that is
it was trying to resize off the edge.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Peter Rooney" wrote in message
...
Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
.offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default problem with interior.colorindex

Peter,

I know I don't need it, it's just for consistency, really, & helps me to
remember where I am (figuratively speaking).
Any way, it WAS a protection issue. Sorry to waste your time.

Pete





"Peter T" wrote:

Hi Pete,

Works fine for me, assuming target is not in the right-most 10 columns.

Not sure the purpose of .Offset(0,0)

Regards,
Peter T

"Peter Rooney" wrote in message
...
Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
.offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default problem with interior.colorindex

Tom, Sorry to waste your time, it WAS protection related.

Thanks

Pete


"Tom Ogilvy" wrote:

On reason would be the sheet is protected. You say it isn't, but that is
really the only reason I can think of

If you are using xl97, then at the top of the code put in

ActiveCell.Activate

--
Regards,
Tom Ogilvy

"Peter Rooney" wrote in message
...
Could anyone suggest any general reasons why this code might report:
"Unable to set the colorindex property of the interior class"?

with target
blah blah blah
.Offset(0, 0).Resize(1, 10).Interior.ColorIndex = 40 'Tan Core
Infrastructure
yada yada yada
end with

I can select the range in a similar way using
.offset(0,0).resize(1,10).select, and the worksheet isn't protected.

Send me home happy for the weekend!

Thanks in advance

Pete




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
Rephrasing Interior.ColorIndex 36 question. Linda New Users to Excel 1 May 28th 10 01:49 PM
Selection.Interior.ColorIndex = 0 Error [email protected] Excel Programming 3 September 28th 05 11:36 PM
Use of Interior.ColorIndex liquidhot Excel Programming 4 June 27th 05 07:22 PM
VBA syntax for Font & Interior ColorIndex Dennis Excel Discussion (Misc queries) 1 November 25th 04 07:38 PM
Testing for Interior.ColorIndex JeffBo Excel Programming 7 May 17th 04 09:41 PM


All times are GMT +1. The time now is 10:13 PM.

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

About Us

"It's about Microsoft Excel"