Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

changing properties of offset cells

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MJKelly - 17 May 2008 14:37 GMT
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
Dana DeLouis - 17 May 2008 14:51 GMT
I think this does the same as you code:

Err.Resize(1, 5).Interior.ColorIndex = 3

Signature

HTH  :>)
Dana DeLouis

> Hi,
>
[quoted text clipped - 9 lines]
> kind regards,
> Matt
MJKelly - 17 May 2008 15:03 GMT
Yes it works, thanks very much.

Matt
Dave Peterson - 17 May 2008 15:27 GMT
You may want to avoid using err as your range variable name.  Excel's VBA
already has an Err object.  

> Hi,
>
[quoted text clipped - 9 lines]
> kind regards,
> Matt

Signature

Dave Peterson

MJKelly - 17 May 2008 16:11 GMT
Thanks Dave, I'll bear that in mind.

kind regards,
Matt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.