View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default ClearContents does not work...

You will need to show more of your code, then, to see what is happening. I
suspect your code never even hits this line. Is it inside a loop or an If
statement? Perhaps the conditions are not met to get the loop or the If
statement to run.

"Kjartan" wrote:

Miguel,
Thank you for your reply.
My code is in a module. Adding the Workbookname did not work either...

"Liedson31" wrote in message
...
hi kjartan....
yes the code you have is ok....it works...
1 questions:
are you running this one in the workbook you want to "clearcontents"

if you don“t you have to put:
workbooks("workbookname").Worksheets("Sheet1").Ran ge("F1:F15").ClearContents

cheers
Miguel

"Kjartan" wrote:

To make 'Empty' cells I expected this to work:

Worksheets("Sheet1").Range("F1:F15").ClearContents

.... but it does nothing... does not even clear numbers in those cells.
Do I need to use another method for this purpose ?


Thank's,
Kjartan