Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
R/T 424 - Object required Help | Excel Discussion (Misc queries) | |||
Object Required | Excel Discussion (Misc queries) | |||
Object Required | Excel Programming | |||
Object required? | Excel Programming | |||
Object required? | Excel Programming |