View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default AS400 copy problem

Hi Edward,

Try:

'=============
Public Sub MoveMinus()
Dim rCell As Range
Dim rng As Range

On Error Resume Next
Set rng = ActiveSheet.Range("A1:A10")
On Error GoTo 0

For Each rCell In rng
With rCell
.NumberFormat = "#,##0.00" '<<==== CHANGE
If IsNumeric(.Value) Then
.Value = CDbl(.Value)
End If
End With
Next rCell

End Sub
'<<=============


---
Regards,
Norman



"edwardpestian"
wrote in message
news:edwardpestian.2a3u23_1151485242.0971@excelfor um-nospam.com...

It compiles okay, but does not work when data is typed in any of the
cells in the range.

Thanks.

ep


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile:
http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=556362