MSFN Forum: What is the code for an empty textbox - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

What is the code for an empty textbox Rate Topic: -----

#1 User is offline   steev 

  • steev
  • Group: Members
  • Posts: 38
  • Joined: 17-July 06

Posted 30 November 2006 - 09:14 AM

I'm new to Visual basic and going through a set of beginner tutorials.

I've made a form with textboxes.

Question: When I scroll through all the textboxes and return to the first one - how do I write the code to say "clear the box and make it empty"
I think it's an If..else statement but after days of frustration and searching online, I still can't find the answer!!
Regards,
Steve


#2 User is offline   ColdFusion200 

  • Junior
  • Pip
  • Group: Members
  • Posts: 85
  • Joined: 14-June 05

Posted 04 December 2006 - 08:00 PM

txtBox.Text = ""

#3 User is offline   neo 

  • Microsoft MVP - Windows Expert Consumer
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,251
  • Joined: 31-March 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 05 December 2006 - 11:00 AM

slect text box and see the properties

In VB 6.0 remove existing text from Caption property.

In VB2005 remove exsiting text from Text property.

This post has been edited by neo_matrix.rs: 06 December 2006 - 10:38 AM


#4 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,249
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 December 2006 - 12:16 PM

In VB6 caption is for a label not a textbox. There is no caption property for a textbox.

textbox.text="" like ColdFusion said should work for any VB textbox.

#5 User is offline   neo 

  • Microsoft MVP - Windows Expert Consumer
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,251
  • Joined: 31-March 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 December 2006 - 10:39 AM

Sorry..! I have made mistake...

#6 User is offline   steev 

  • steev
  • Group: Members
  • Posts: 38
  • Joined: 17-July 06

Posted 12 December 2006 - 02:07 PM

Thanks for your help - that works!!
Regards,
Steve

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy