VBA

Visual Basic for Applications(VBA)是Visual Basic的一种宏语言,是微软开发出来在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。主要能用来扩展Windows的应用程序功能,特别是Microsoft Office软件。

人们常见的办公软件Office软件中的WordExcelAccessPowerpoint都可以利用VBA使这些软件的实现自动化。

第一次使用

1、打开LibreOffice calc (我使用的是Ubuntu16.04,自带)

2、Tools-->Options--Security-->Macro Security-->Low (自己写的程序没必要担心安全问题,也可不改)

3、Tools-->Macros-->Organize Macros-->LibreOffice Basic

4、Untitled 1-->New-->输入模块名-->OK

5、编写-->保存-->运行

Hello World代码示例

1 REM  *****  BASIC  *****
2 
3 Sub Main
4     Dim s as string
5     s = "Hello"
6     msgbox(s)
7 End Sub

界面如下:

VBA Promming——入门教程

参考链接:https://youtu.be/L8uSP24f9LQ

 

相关文章:

  • 2022-01-01
  • 2021-12-10
  • 2021-06-07
  • 2021-06-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
猜你喜欢
  • 2021-11-17
  • 2022-12-23
  • 2021-12-04
  • 2021-12-25
  • 2021-12-02
  • 2021-09-07
  • 2021-08-20
相关资源
相似解决方案