宏是什么意思?

发布于 2024-07-27 01:44:17 字数 172 浏览 4 评论 0原文

我对人们所说的 Excel“宏”有一些经验。 控制activeX组件的vba代码,对吧?

但我仍然不知道宏这个词的真正含义:)。 什么样的代码称为宏? 是不是像vba或者js之类的东西实现到程序中了? 就像 vba 到 excel 或 vba 到 autocad 或 js 到 Flex 一样?

I have somewhat experience with what people call excel "macros". The vba code that controls the activeX components, right?

But I still do not know the true meaning of the term macro :). What kind of code is called macro? Is it something like vba or js implemented into a program? Like vba to excel or vba to autocad or js to flex?

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

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

发布评论

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

评论(2

二智少女猫性小仙女 2024-08-03 01:44:17

维基百科在下有答案。

定义:

该术语起源于宏汇编器,其思想是为程序员提供一系列计算指令作为单个程序语句,从而使编程任务不那么繁琐且不易出错.

用法:

使用应用程序的内置宏功能创建的键盘和鼠标宏有时称为应用程序宏。 它们是通过执行一次序列并让应用程序记录操作来创建的。 还可能存在可以直接访问应用程序功能的底层宏编程语言,最常见的是脚本语言。

如果您点击链接,还有更多内容。

Wikipedia has the answer, under Macro.

Definition:

The term originated with macro-assemblers, where the idea is to make available to the programmer a sequence of computing instructions as a single program statement, making the programming task less tedious and less error-prone.

Usage:

Keyboard and mouse macros that are created using an application's built-in macro features are sometimes called application macros. They are created by carrying out the sequence once and letting the application record the actions. An underlying macro programming language, most commonly a Scripting language, with direct access to the features of the application may also exist.

There's lots more, if you follow the link.

黄昏下泛黄的笔记 2024-08-03 01:44:17

当谈到 MS Office 产品(Excel、Access、Word、PowerPoint 等)时,“宏”就是 VBA(Visual Basic for Applications)代码。
注意:在 Access 数据库中,宏还可以表示除 VBA 代码之外的另一种类型的自动化。

既然你提到了Excel...我就谈谈Excel。

如果您怀疑(或知道)存在带有宏的 Excel 文件,请在打开 Excel 文件时尝试按 Alt + F11 键。
您应该会看到打开的 VBA 屏幕。
您可以在此处看到 VBA 代码(即,如果编写 VBA 代码的程序员没有将其锁定在密码后面)。

宏(VBA 代码)用于自动执行某些任务。
因此,在 Excel 中,VBA 程序员可以在工作表上放置一个按钮,当您单击该按钮时,Excel 文件中可能会发生一些活动 - 例如计算、复制、粘贴、删除等活动。

阅读一些“在中记录宏”的内容优秀”。

When it comes to MS Office products (Excel, Access, Word, PowerPoint etc), "macro" is VBA (Visual Basic for Applications) code.
NOTE: In Access databases macro can also mean another type of automation besides VBA code.

Since you mentioned Excel...I will talk about Excel.

If you suspect (or know) there is an Excel file with macro, try hitting the Alt + F11 key when you have the Excel file open.
You should see a VBA screen open.
This is where you might be able to see the VBA code (ie, if it is not locked behind a password by the programmer who wrote the VBA code).

Macro (VBA code) is used to automated certain tasks.
So in Excel VBA programmer could put a button on a sheet and when you click the button some activities might take place in the Excel file - activities like calculations, copying, pasting, deleting etc..

Read up a little on "recording a macro in Excel".

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