Basic Syntax and Examples Tutorial [closed]

荒凉一梦 提交于 2020-01-09 08:00:27

问题


At work I work closely with MS-Office. I have managed to generate some scripts that perform various tasks. While I can port functions to VBA with some difficulty, I do not fully understand the foundations of the VBA language.

Items for which I seek basic syntax and examples include: 'hello world' program, loops, flow control, variable declaration, variable type conversions, Objects (if possible), file/user input/output, when 'with' block can be used, and so on.

Could someone provide me with a link to a VBA tutorial, perhaps with the details of the above items?


回答1:


The versions of VBA post Office 2000 are almost identical to VB6. This MSDN site is a great place to start. The VB6 resource center might also be of use.




回答2:


MSDN: Developing Office Applications Using VBA

If you haven't taken a look at it already, you can learn a lot from Visual Basic help within Office. To access it open an Office program and press Alt+F11 to open the Visual Basic Editor. Then press F1 or navigate to Help -> Microsoft Visual Basic Help. Also, as Mitch mentioned, if you learn the basics of VB6 you can use the same syntax for VBA.




回答3:


I think you will find this video tutorial pretty helpful:

http://developresource.weebly.com/10/post/2011/11/vba.html

And there are some other great stuffs you can find there so have a try :)



来源:https://stackoverflow.com/questions/292348/basic-syntax-and-examples-tutorial

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!