View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Find and clearcontent

maybe???

Option Explicit
Sub testme()

Dim FoundCell As Range

With ActiveSheet
Set FoundCell = .Cells.Find(what:="end of report", _
after:=.Cells(.Cells.Count), LookIn:=xlValues, _
lookat:=xlWhole, searchorder:=xlByRows, _
searchdirection:=xlNext, MatchCase:=False)
If FoundCell Is Nothing Then
'do nothing
Else
.Range(FoundCell, .Cells(.Rows.Count, "A")).EntireRow.ClearContents
End If

End With

End Sub

xl-end-database means row 65536?????




Rui wrote:

Hi,

I´m trying to clearcontent from my imported database the rows from "End of Report" cell to "xl-end-database".

i've done the finding "End of Report" cell (cell.find( ... )) but can´t put it in a range to the end of database to clear. i thought of make it a variable, but still no results!

(excel xp)


--

Dave Peterson