LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default Object required?

The following piece of code errors out at the line indicated:

Set rTtl = ActiveSheet.Range("A10:AE10")


For Each rCell In rTtl

rCell.Select

If rCell = "" Then

rCell.EntireColumn.Delete
rCell.Offset(0, -1).Activate<---OBJECT REQUIRED

Else: rCell.EntireColumn.AutoFit
End If
Next

Can anyone tell me what it's looking for? I've tried both "activate"
and "select", but I get the same error.
The program goes across row 10, checking each cell for content. If the
cell is blank, it deletes the column. The problem comes when it deletes
the column. If the column to the right is also blank, it skips over it
when it comes to the "Next" line. I want it to test and, if necessary
delete that column.
Thanks!

 
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
R/T 424 - Object required Help Jim May Excel Discussion (Misc queries) 2 April 10th 08 03:01 PM
Object Required aftamath Excel Discussion (Misc queries) 2 March 14th 06 10:19 PM
Object Required teresa Excel Programming 9 May 31st 05 06:21 PM
Object required? Vasant Nanavati Excel Programming 0 May 14th 05 09:38 PM
Object required? Tony Excel Programming 2 March 22nd 05 04:52 PM


All times are GMT +1. The time now is 07:19 AM.

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"