Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I used the macro recorder to generate this code which worked without
errors: Sheets("Larry").Select Columns("D:D").Select Selection.ClearContents Sheets("Harry").Select Columns("D:D").Select Selection.ClearContents Range("C1").Select So I generalized it to be this: For Each ws In ThisWorkbook.Worksheets strWsName = ws.Name Worksheets(strWsName).Select Worksheets(strWsName).Activate Columns("D:D").Select Selection.ClearContents Next ws But on the 2nd worksheet the Columns("D:D").Select gives me the error in the Subject of this message. Sugestions please! How do get Excel to run this without complaining? BTW: Column D in this context is a message area. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime 1004 error -- insert method of range class failed. | Excel Discussion (Misc queries) | |||
RUNTIME ERROR '1004' --- Select method of worksheet class failed | Excel Programming | |||
runtime error '1004' delete Method of Range Class Failed | Excel Programming | |||
Runtime Error "1004" Select Method of Range Class Failed | Excel Programming | |||
excel97: runtime error 1004 select method of range class failed | Excel Programming |