在VBA中隐藏用户表单以便使用数据 [英] Hide userform in VBA in order to work with data

查看:52
本文介绍了在VBA中隐藏用户表单以便使用数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下问题.我想隐藏一个用户表单以便使用工作表中的数据.

I have a following problem. I would like to hide a userform in order to work with data in worksheet.

我希望使用户能够返回到应用程序.因此,我认为是否有可能在屏幕上向下移动用户窗体并激活工作簿.然后,用户可以将用户窗体拖回屏幕中间,然后再次使用它.

I would like to enable user to get back to application. So I thought if there is a possibility to move userform down on the screen and activate workbook. Afterwards the user could drag userform back in the middle of the screen and work with it again.

有人有这样的经历吗?

推荐答案

您可以使用 me.hide 隐藏用户窗体,保留输入到表单中的所有值.使用 me.show 将用户表单重新显示在屏幕上.

You can use me.hide to hide userform, retaining all values entered into the form. Use me.show to bring back the userform to the screen.

这与卸载我不同,后者将用户窗体从内存中卸载,破坏了所有输入的值.再次调用该表格将开始新的表格.

This is different from unload me, which unload the userform from memory, destroying all values entered. Calling the form again will start the form a new.

如果您希望表单仍然可见并且允许用户与后面的工作表进行交互,则将 ShowModal 属性设置为False.默认值为True.

If you want the form to be still visible and allow user to interact with worksheet behind, then set the ShowModal property to False.. The default is True.

这篇关于在VBA中隐藏用户表单以便使用数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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