Problem in WITH/END WITH code snippet

H

Hash

Gang -

In set range r this code works:

With r
.formula = .value
End With

This doesn't:

With r
.formula = vba.replace(.value,chr(160),chr(32),1)
End With

What am I missing?

Thanks in advance.
....best, Hash
 
G

Guest

Is this what you want?

For Each cell In r
cell.Value = Replace(cell.Value, chr(160), chr(32), 1)
Next
 

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

Top