Current location - Recipe Complete Network - Complete cookbook of home-style dishes - Grammatical format of VBA and its application in excel.
Grammatical format of VBA and its application in excel.
This question contains a lot of gold. First of all, VBA is a built-in secondary development function of OFFICE software, with VB code as the programming language and the editing window named VBE. The following simple answers are easy to understand.

How to use it in EXCEL: use the shortcut key ALT+F 1 1? Or in the menu bar, you can enter the VBE window to edit VBA code through the "Development Tools"-"Visual Basic" tab.

If you can't find the development tools tab, you can click File (2007 is a circular OFFICE icon)-Options-User-defined function options, check the development tools and confirm, as shown in the following figure.

Use of code and simple examples:

Associated use of code: In VBA, each EXCEL part (workbook, worksheet, buttons and other spaces) is called an object, which has "properties" and the operation of the object is called "method", as shown in the sample program:

VBA is more powerful than you think, and its ability to process tables can greatly improve your work efficiency. It is not as easy to be deleted or mistakenly changed as function formulas.

Some simple and common methods are for the next? Loop if (elseif else) ends if? Sure. Find a search and so on.

If you are interested, you can learn about it systematically. It's not that difficult, but you need to keep learning to enrich your knowledge base.

Recommend something like "EXCELHOME Forum?" ? EXCEL elite training? Wait for some great websites and forums.

sub? Example ()

msgbox? sheet 1.name? The name sheet 1 pops up. This is the property of the calling object.

shett 1.name? =? Name of "Table 1" shhet 1. This is the assignment method of the object

End? submarine