Clear Contents

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why does the following not work on merged cells?

Range("DailyHours").ClearContents

When this does

Application.Goto Reference:="DailyHours"
Selection.ClearContents

I must be able to clear the contents of a range without selecting it, how?


Thanks for the help
Richard
 
Hi,

Try this,

range("DailyHours").MergeArea.clearcontents

Cheers
Andy
 
I assume DailyHours refers to a single cell within a merged area - so try:

Range("DailyHours").MergeArea.ClearContents

which worked for me
 
Tom

DailyHours refers to a range of cells, within which there are merged cells.

Richard
 
In what way does it not work?

Maybe you can provide detail of the range, DailyHours. What cells does it
include?
Which of the cells in the range are merged.

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

A simpler way 4
Warning Macro 8
Clearing an Active X text box with a macro 3
Select Range Name Q 7
Help on coercing a range 1
400 Error 3
Clearing Cells 5
Clearing the contents of a row 2

Back
Top