在Excel文档中-如何使用VB进行保存选项 [英] In Excel documents-how to make save options by using VB

查看:388
本文介绍了在Excel文档中-如何使用VB进行保存选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有一个关于如何在Excel工作表中使用VB保存选项的问题.

这是问题所在:

我使用VB制作了一些控件并创建了文本框,并且在保存此框的同时,我需要放置一个不向用户传递填充texbox权限的控件.
是否有代码可防止在保存文档时出现空白文本框.可以发出警告消息,例如请填写空白",然后不保存就打开文档.

谢谢.

Hello,

I have a question about how can I save options by using VB in excel sheet.

Here is the problem:

I made some controls by using VB and create textboxes and while save this, I need to put a control that do not give permission to the user pass fill texboxes empty.
Is there a code that prevent empty textboxes while save the document. It can be give a warning message like "please fill in the blanks" and turn the document without saving.

Thank you.

推荐答案

在保存"按钮上只是查看文本框是否为空
On Save Button just Check out Wether the TextBox is Empty or Not
Private Sub Button1_Click(ByVal sender As Object,ByVal e As EventArgs) Handls Button1.Click
If TextBox1.Text="" Then
    MessageBox.Show("Please Enter Somthing Here","Warning")
    TextBox1.Clear()
Else
    'Here your Code to Save Data
End Sub


这篇关于在Excel文档中-如何使用VB进行保存选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆