C
Conan Kelly
Hello all,
I've been looking through the
Help files for this and this
is what they have
listed:
Sub RoundToZero2()
For Each c In
Worksheets("Sheet1").Range("A110").Cells
If Abs(c.Value) < 0.01
Then c.Value = 0
Next
End Sub
The range I want to use in
this loop is already selected
(after pasting, the pasted
data is selected). So I tried
changing
"Worksheets("Sheet1").Range("A110").Cells"
to
"ActiveWindow.RangeSelection.Cells".
No workie...
The other thing I'm concerned
about is the "For Each c":
Does "c" need to be set to an
object variable (like a "Cell"
or "Cells" object or something
like that), or will Excel/VBA
automatically know that "c"
means each cell in the range.
thanks for any help anyone can
provide,
Conan Kelly
I've been looking through the
Help files for this and this
is what they have
listed:
Sub RoundToZero2()
For Each c In
Worksheets("Sheet1").Range("A110").Cells
If Abs(c.Value) < 0.01
Then c.Value = 0
Next
End Sub
The range I want to use in
this loop is already selected
(after pasting, the pasted
data is selected). So I tried
changing
"Worksheets("Sheet1").Range("A110").Cells"
to
"ActiveWindow.RangeSelection.Cells".
No workie...
The other thing I'm concerned
about is the "For Each c":
Does "c" need to be set to an
object variable (like a "Cell"
or "Cells" object or something
like that), or will Excel/VBA
automatically know that "c"
means each cell in the range.
thanks for any help anyone can
provide,
Conan Kelly