This error is not caught during design time because it is not a syntax error. Set wb = ActiveWorkbook.Name attempts to assign the variable wb not to the active workbook, which would be legal, but to the name of the active workbook. (We will go into all of this in Chapter 17, so don't worry about the details now.) However, the second line: In particular, the first line:ĭim wb as Workbook defines a variable of type Workbook to represent an Excel workbook. For example, the code in Figure 4-5 contains a compile-time error. If Excel encounters an error while compiling code, it displays a compile error message. We can also specifically request compilation by choosing the Compile Project item under the Debug menu. The compilation process occurs automatically when we request that a program be executed. Before a program can be executed, it must be compiled, or translated into a language that the computer can understand.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |