View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_757_] Simon Lloyd[_757_] is offline
external usenet poster
 
Posts: 1
Default Clearing a value from a TextBox Automatically??


Hi all, Below is some code i use to delete some data, and i have no
worked out clearing the Textbox, but i have one other problem, when th
search takes place if the user hasn't typed the text or value to loo
for in the case in which it was typed it finds nothing how can i mak
it so that the case doesn't matter?

Regards,
Simon

Dim mycell
Dim rng As Range
Worksheets("Stats12").Visible = True
Set rng = Range("Statlist")
For Each mycell In rng
If mycell.Value = Worksheets("New stats").TextBox1.Value Then
mycell.Value = ""
mycell.Offset(0, 1) = ""
mycell.Offset(0, 2) = ""
Call playersort
Worksheets("New stats").Select
Worksheets("Stats12").Visible = False
End If
Next
Call tboxClear
End Sub

Sub tboxClear()
With Worksheets("New Stats")
Worksheets("New Stats").Select
If Range("A99").Value = "" Then
Worksheets("New Stats").TextBox1.Value = ""

End If
End With
End Su

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=54761