在 VBA 中添加/删除可选的个人表单

发布于 2024-09-25 06:58:40 字数 191 浏览 0 评论 0原文

在 Excel 中实现 vba 功能的最简单/最佳方法是什么:
-“添加人员”按钮将添加 4 行,其中用户指定名称..., 还有“
- 新添加条目中出现的“删除人员”按钮 - 将其删除

执行此操作的工作流程是什么?

我应该先记录一下吗? 我应该只写VBA吗?如何保留可以添加/删除的部分 - 隐藏在某处或在 VBA 中?

What is simplest/best way to achieve functionality in vba in Excel:
- button "add person" which will add 4 rows in which user specifies name...,
also "
- button "delete person" appearing in new added entry - to delete it

What is a workflow for doing that?

Should I record that first?
Should I write VBA only? How to keep the part that can be added/deleted - somewhere hidden or in VBA?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

素手挽清风 2024-10-02 06:58:40

最简单的解决方案是创建宏;

  1. 添加人员
    之后,您需要使用 vba 将此宏分配给按钮(通过右键单击并分配宏)。然后循环 4 次。

  2. 要删除人员 --> 首先创建按钮并将可见性设置为 false。之后,您需要识别行号,并在 vba

    中将按钮设置为可见

well the simplest solution is to create macros;

  1. to add person
    after that, you need to assign this macro to the button with vba ( by right click and assign macro).and loop it 4 times.

  2. to delete person -->1st you make the button and set the visibility to false. After that you need to identify the row number, and set the button to visible in vba

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文