可以对命令按钮进行编码以在两个不同的子例程之间提示用户 [英] Can a command button be coded to prompt a user between two different subroutines

查看:89
本文介绍了可以对命令按钮进行编码以在两个不同的子例程之间提示用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我有两个子程序。一个创建/提供一个工作表excel工作簿,另一个创建/提供多个工作表excel工作簿。


可以修改单个命令按钮后面的代码以提示用户选择在两个不同的子程序之间?有点像参数查询的原理吗?


我看过网上但找不到任何东西。


谢谢。


UTS

Hello,

I have two subroutines. One creates/delivers a one worksheet excel workbook, the other one creates/delivers a multiple worksheet excel workbook.

Can the code behind a single command button be modified to prompt a user to choose between two different subroutines? Sort of like the principle of a parameter query?

I have looked online but not quite found anything.

Thank you.

UTS

推荐答案

是的,创建第三个子,询问用户他们想要哪一个,然后使用其他来调用正确的一个取决于他们的反应。
Yes, create a third sub that asks the user which one they want and use if then else to call the correct one depending on their response.


触地得分,谢谢!或者我应该说GGGGGGOOOOOAAAAAAALLLLLL!

UTS
Touchdown, thanks! Or should I say GGGGGGOOOOOAAAAAALLLLLL!

UTS


是的。您可以在命令按钮事件过程中使用 MsgBox()来确定操作员需要什么,然后根据响应调用其他任何一个例程。
Yes. You can use MsgBox() in your Command Button Event Procedure to determine what the operator requires then invoke either of the other routines depending on their response.


这篇关于可以对命令按钮进行编码以在两个不同的子例程之间提示用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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