本文介绍了在Visual Basic中验证文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我的表单上有文本框,详细信息如下:


因此,我想知道,如何也不要在文本框中保存此借口?我的意思是,如果用户未在文本框中键入任何内容,则只能保存空白字段,并且不得保存其借口.

Hello, I have textbox on my form, the details are below:


So, I want to know, how to NOT save this pretext on the textbox also? I mean only blank field and the pretext must not be saved if the user has not typed anything on the textbox.

推荐答案

If textbox.text = "" Or textbox.text = "Insert username here" Then
MsgBox ("Fill the username field please")
Else
Etc....


这篇关于在Visual Basic中验证文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:08