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


Hi all, i have put together some code to delete 3 items of data
dependent on Textbox1 value....It works fine only, i can not get
Textbox1 to clear the value or text in it after deletion,

Any ideas?
Here's the code

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
With Worksheets("New Stats")
Worksheets("New Stats").Select
TextBox1 = ""
End With
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=547614