Re: Run-Time error '1004': No cells were found
- From: "Bob Phillips" <bob.NGs@xxxxxxxx>
- Date: Mon, 27 Nov 2006 22:17:30 -0000
Have you got any cells with constant values? Alok's code tested the range
first for matches, and does nothing if there are none.
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"Regina" <Regina@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:54C90183-DED0-440A-95F0-403167458EEE@xxxxxxxxxxxxxxxx
Hi Alok,following
I copied your reply directly into the macro and it didn't do any actions.
It didn't error but there wasn't any action either. Thanks for you help!
Any other suggestions?
--
Regina
"Alok" wrote:
Regina,
Try this
Sub clear_part2()
Dim r As Range
On Error Resume Next
Set r = Range("D7:E125").SpecialCells(xlCellTypeConstants)
On Error GoTo 0
If Not r Is Nothing Then
r.Clear
End If
End Sub
"Regina" wrote:
The subject line is the error message I get when trying to run the
r -code. When I hit debug, it highlights the line that starts with "set
therange...". What I am trying to do is clear the constants but leave
formulas in the "D7:E125" Range. Help!!!!
' Sub clear_part2()
Dim r As Range
Set r = Range("D7:E125").SpecialCells(xlCellTypeConstants)
r.Clear
End Sub
--
Regina
.
- Prev by Date: Re: Using VBA to split individual characters across cells
- Next by Date: RE: Run-Time error '1004': No cells were found
- Previous by thread: Re: Using VBA to split individual characters across cells
- Next by thread: RE: Run-Time error '1004': No cells were found
- Index(es):
Relevant Pages
|