View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Ken McLennan[_3_] Ken McLennan[_3_] is offline
external usenet poster
 
Posts: 90
Default Clearing TextBoxes needs 2 clicks

G'day there Tom,

Private Sub CommandButton3_Click()

Range("Distict").Clearcontents
Range("OtherName').ClearContents

End Sub


It worked!! That approach has done the trick!!

I don't suppose you can think of any reason why that works and the
way I tried first off didn't? I don't know how XL calculates these
things, so if you know can you please elucidate that I might understand
just a tad of what I'm doing?

Do you have any events defined for the textboxes such as Change or Click?


No, none at all.

Default means that if you did

.Textbox1 = ""

then excel would interpret this to mean
.Textbox1.Text = ""


Hmm... quoting from the help file:

The default property for a TextBox is the Value property.

So in this instance, is the .Text property equal to the .Value
property because Textboxes deal with text?

Thanks very much for your assistance,
Ken McLennan
Qld, Australia