Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Instead of using the code below, is there a way of setting the colorindex of offset(0,0) to offset(,4)? Err.Offset(0, 0).Interior.ColorIndex = 3 Err.Offset(0, 1).Interior.ColorIndex = 3 Err.Offset(0, 2).Interior.ColorIndex = 3 Err.Offset(0, 3).Interior.ColorIndex = 3 Err.Offset(0, 4).Interior.ColorIndex = 3 kind regards, Matt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think this does the same as you code:
Err.Resize(1, 5).Interior.ColorIndex = 3 -- HTH :) Dana DeLouis "MJKelly" wrote in message ... Hi, Instead of using the code below, is there a way of setting the colorindex of offset(0,0) to offset(,4)? Err.Offset(0, 0).Interior.ColorIndex = 3 Err.Offset(0, 1).Interior.ColorIndex = 3 Err.Offset(0, 2).Interior.ColorIndex = 3 Err.Offset(0, 3).Interior.ColorIndex = 3 Err.Offset(0, 4).Interior.ColorIndex = 3 kind regards, Matt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes it works, thanks very much.
Matt |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may want to avoid using err as your range variable name. Excel's VBA
already has an Err object. MJKelly wrote: Hi, Instead of using the code below, is there a way of setting the colorindex of offset(0,0) to offset(,4)? Err.Offset(0, 0).Interior.ColorIndex = 3 Err.Offset(0, 1).Interior.ColorIndex = 3 Err.Offset(0, 2).Interior.ColorIndex = 3 Err.Offset(0, 3).Interior.ColorIndex = 3 Err.Offset(0, 4).Interior.ColorIndex = 3 kind regards, Matt -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave, I'll bear that in mind.
kind regards, Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Autoshape properties using formulas only | Excel Discussion (Misc queries) | |||
Can't Paste after Changing Cell Properties | Excel Programming | |||
Changing combobox properties | Excel Programming | |||
Cell changing it's properties | New Users to Excel | |||
Properties transferring from excel cells to word file properties | Excel Programming |