您可以通过VB.NET向Excel工作表按钮添加/插入宏/ VBA代码吗? [英] Can you add/insert a macro/VBA code to excel worksheet button through VB.NET?

查看:191
本文介绍了您可以通过VB.NET向Excel工作表按钮添加/插入宏/ VBA代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在sheet1到vb.net中创建了一个commandbutton1。此外,我已经添加了一个宏/ vba代码但仅在Module中。我唯一的问题是如何在commandbutton1点击事件中插入宏/ vba代码。



< b>我尝试了什么:



我试过但不幸的是只用模块。

解决方案

< blockquote>这是你在 https://www.codeproject.com/Questions/1450559/How-to-put-a-VBA-code-inside-command-button-of-exc [ ^ ]。请不要重新发布。


引用:

我唯一的问题是如何插入宏/ vba在commandbutton1点击事件中的代码。



数百万人已经学习了20年的这些东西,有MS文档,教程和大量的视频教你比我们在这里讲的要好得多。

你只需要谷歌并选择。

学会用网络搜索引擎来帮助自己。

Quote:

我已经在sheet1到vb.net中创建了一个commandbutton1。另外我已经添加了一个宏/ vba代码但只在Module中。



这个描述很奇怪,你能详细介绍一下吗?


I already created a commandbutton1 in sheet1 through vb.net. Also I already added a macro/vba code but in Module only.My only problem is on how to insert the macro/vba code inside the commandbutton1 click event.

What I have tried:

I tried but unfortunately to module only.

This is the same question as you already posted at https://www.codeproject.com/Questions/1450559/How-to-put-a-VBA-code-inside-command-button-of-exc[^]. Please do not repost.


Quote:

My only problem is on how to insert the macro/vba code inside the commandbutton1 click event.


Millions have learned this stuff for 20 years, there is MS documentation, tutorials and heaps of videos that will teach you far better than what we can tell here.
You just have to Google and choose.
Learn to help yourself with web search engines.

Quote:

I already created a commandbutton1 in sheet1 through vb.net. Also I already added a macro/vba code but in Module only.


This description is weird, can you give details on you do ?


这篇关于您可以通过VB.NET向Excel工作表按钮添加/插入宏/ VBA代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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