Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Problem in WITH/END WITH code snippet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Problem in WITH/END WITH code snippet

Is this what you want?

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

" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Problem in WITH/END WITH code snippet

rowno = Selection.Find("123").Row

" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Putting a Snippet of Text in a Cell DeeDeeCee Excel Discussion (Misc queries) 5 July 25th 09 04:10 AM
Code snippet storage Ken McLennan[_3_] Excel Programming 9 August 20th 04 03:25 PM
Help Deciphering a Lotus Macro Snippet Raul[_4_] Excel Programming 2 April 21st 04 01:03 AM
MaxRows 65536 in a sheet - A Code Snippet Ravee Srinivasan[_2_] Excel Programming 0 November 10th 03 04:16 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"