View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Jackson Jim Jackson is offline
external usenet poster
 
Posts: 324
Default would anybody help please?

Can you fit "Selection.ClearContents" into the equation?
--
Best wishes,

Jim


"TheGodfather" wrote:

i have the following problem with this code :

Private Sub DeleteButton_Click()
Dim i
If Not Cleared Then
With Sheets("Sheet1")
i = Application.Match(CVar(Me.ctrlList.Value), Range("C:C"),
0)
Cleared = True
.Range(("C") & i).EntireRow.Delete Shift:=xlUp
End With
End If
Cleared = False

this code deletes only the non numeric values but in row C i have
numeric and text values so it works just for text whenever i go to a
numeric it gives me error can u please help improving it to delete
everything i ask it to,
NB. if CVar is changed to Cint i have the same problem but the other
way round, it delets only numerics, but i want to delete anything
any help appreciated
cheers