VBA Hello world

Step 0. Environment

  • Microsoft Office

    • Excel
    • Outlook
    • Access
    • ...
  • VB editor: Alt + F11

    • Hello world: msgbox

Step 1. What is VBA

VBA代表Visual Basic for Applications,这是一种来自Microsoft的事件驱动编程语言,现在主要与Microsoft Office应用程序(如MSExcel,MS-Word和MS-Access)一起使用。
它帮助技术人员构建定制的应用程序和解决方案,以增强这些应用程序的功能。这个工具的优点是不需要在电脑上安装visual basic,直接从安装Office软件中就能隐含地使用来达到目的。
您可以在所有Office版本中使用VBA,从MS-Office 97到MS-Office 2016以及任何最新版本。 在VBA中,Excel VBA是最流行的。使用VBA的好处是可以使用线性编程在MS Excel中建立非常强大的工具。//原文出自【易百教程】,商业转载请联系作者获得授权,非商业请保留原文链接:https://www.yiibai.com/vba/vba_overview.html

VBA Hello world_第1张图片
Top10.png

Step 2. Features

  • Module
    • Sub
    • Function
  • Comments
  • Data type:

不同数据类型占用不同大小的字节
byte 1字节
short 2字节
int 4字节
long 8字节
char 2字节
float 4字节
double 8字节

  • Integer
  • Double
  • String
  • object
    • dictionary
    • array
    • class: Sheet, Range, Cell
  • For / If

Step 3. Real case show

Email bot for GS: Auto reply emails with reasonable links based on key words mapping table.

Step 4. First VBA app

  • Change names
  • Send Emails

你可能感兴趣的:(VBA Hello world)