一、VBA简介——自动运行宏
2017-02-28 本文已影响0人
霹雳小青龙
自动运行宏需要用到auto_open,在Excel中建立如下宏:
Sub auto_open()
MsgBox "Welcom to VBA", _
vbOKOnly, "Welcome"
End Sub
保存宏,打开Excel即自动弹出
自动运行宏需要用到auto_open,在Excel中建立如下宏:
Sub auto_open()
MsgBox "Welcom to VBA", _
vbOKOnly, "Welcome"
End Sub
保存宏,打开Excel即自动弹出