在表单中使用If条件 [英] use of If condition in a form

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

问题描述

我们正在考虑在WORD 2010中构建一个模板表单。

We are considering building a template form in WORD 2010.

我已经设法通过使用Userform(VB)创建模板来填充表单的许多区域。哪个工作正常。

I have managed to create the template by using Userform (VB) to populate many areas of the form. Which works fine.

然后在表单中我有选项选择是和否(从下拉菜单中)。

Then in the form I have options to select Yes and No (from Drop down menu).

现在我需要一些控制这是和否。

Now I need some control with this Yes and No.

问题在于:

选项1:

如果我选择从下拉菜单中选择是,然后在下一部分中显示部分文字以供进一步选择

If I select Yes from the Drop down menu then in the next section a portion of text should appear for further selection

如果我选择否,则应提示我转到另一部分。

Or if I select No it should prompt me to go another section.

否则 - 选项2 - 活动或非活动文本

Otherwise - Option 2 - active or inactive text

假设我总是在文件中包含整个文档或文本 - 如果我选择是一个文本的一部分应该处于活动状态。

Lets assume I always have the entire documents or text in the file - then if I select Yes one portion of the text should be in active.

请你帮我创建这样的逻辑文档。

Could you please help me to create such logical document.

提前致谢




推荐答案

您好,

选项1,您可以使用选择。 GoTo跳转到下一部分

Option 1, you may use Selection.GoTo to jump into next section

Select Case Value
Case "Yes"
Selection.GoTo What:=wdGoToSection, Which:=wdGoToNext, Count:=1
Case "No"
MsgBox "Please go to another section"
End Select

选项2: 你是什​​么意思"活跃或不活跃"?你想锁定这些文字吗?我建议您使用内容控件来阻止用户编辑或删除。

Option 2:  What do you mean "active or inactive"? Do you want to lock these text? I would suggest you use content control to prevent users from editing or deleting.

问候,

Celeste


这篇关于在表单中使用If条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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