Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Rephrasing Interior.ColorIndex 36 question. | New Users to Excel | |||
Selection.Interior.ColorIndex = 0 Error | Excel Programming | |||
Use of Interior.ColorIndex | Excel Programming | |||
VBA syntax for Font & Interior ColorIndex | Excel Discussion (Misc queries) | |||
Testing for Interior.ColorIndex | Excel Programming |