Excel 2010 - Overview of Visual Basic Editor - MacroMountain.comhttp://www.MacroMountain.com Overview How to Open the VB Editor VB Editor Overview Project Window Properties Window Code Window Insert a User Form Insert a Module Insert Class Modules Module Types Explained How to Open the VB Editor Click the Developer Tab Click the Visual Basic button Project Explorer Window Show the Project Explorer Window Click View Then, Project Explorer Shortcut: Ctrl + R The Project Explorer Window shows all of the open workbooks and the components in them, such as: worksheets, user forms, modules, and class modules. Properties Window Show the Properties Window Click View Then, Properties Window Shortcut: F4 The Properties Window will change as different components are selected. For example, select one of the worksheets and the first property will be the name of that worksheet. Code Window Show the Code Window Double-click on one of the objects in the Project Window For example, double-clicking on a worksheet will bring up the code, if any, that is on that worksheet. Insert a User Form Insert a User Form Click Insert Then, click UserForm The new UserForm will be inserted at the bottom of the Project Window. The Code Window will show the UserForm. That is where Form Controls would be inserted, such as: text boxes, radial buttons, check boxes, etc. Insert a Module Insert a Module Click Insert Then, click Module The new Module will be inserted at the bottom of the Project Window The Code Window will be blank and ready for input Insert Class Modules Insert Class Modules Click Insert Then, click Class Module The new Class Module will be inserted. The Code Window will be blank and ready for input Module Types Explained Sheet Modules Each sheet in the workbook will have its own sheet module Programming code specific to a worksheet can go in the sheet modules ThisWorkbook Module Workbook events can be programmed in the ThisWorkbook Module Events allow code to be executed based on actions that happen in the workbook, such as Workbook_Open or Workbook_Activate. Forms This is where forms can be designed. They allow users to make inputs or selections and then the corresponding code will execute. Modules Most code will be stored in these modules. The Macro Recorder automatically put its code into this type of module. Class Modules You can create custom Class Modules that can be shared between programmers. code pour embarquer la vidéo : >>> http://www.youtube.com/embed/oxhTb3c2Le4 <<< |