Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to Select a Merged Cell

Status
Not open for further replies.

jadadad

Technical User
Jun 2, 2004
12
US
I am trying to select a merged cell and then delete the text in that merged cell. Simple enough. I even generated the code using the Macro recorder (see below). But when I execute the code I get the error....

"Select method of range class failed".

Any insights?

Thanks,
Mike

+++++++++++++

Sheets(2).Activate
For k = 1 To 20
Range("B1:F1").Select
Selection.ClearContents
Range("A1").Select
If k < 21 Then Sheets(k + 2).Activate
Next k

 
You might try selecting only the upper left most cell of the merged range.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top