Decision Making in Excel VBA

In Excel VBA, we can write decision-making codes based on certain conditions. There are two methods to write decision-making code in Excel VBA, using the If…..Then…Else syntax or using the Select Case…End select syntax.

The syntaxes are exactly the same as VB6.  You need to use both the conditional operators and the logical operators together with If…The…Else statements and Select Case statements.

For example

If sale>1000 Then

bonus=50*sale

Else

Bonus=0

End If

For more information, read the articles below:

Excel 2010 VBA Lesson 10: Using If…Then…Else

Excel 2010 VBA Lesson 11: Using Select Case

Creating Charts and Graphs in Excel VBA 2010

In Excel VBA 2010, we can write code to create charts and graphs easily based on the data on the spreadsheet. Excel 2010 has made charting engine as part of the Shape object. It is also an object by itself. We can create charts on a sheet of their own or embed them into an existing worksheet. The chart sheet is the Chart object whereas the embedded chart is part of the shape collection for the worksheet. Learn more in the link below:

http://excelvbatutor.com/index.php/excel-vba-2010-lesson-24-creating-charts-and-graphs/

 

 

The Range Object in Excel VBA 2010

Range is one of the most important and most commonly used Excel VBA 2010 object. The Range object contains two arguments that specifies a selected area on the spreadsheet. The syntax is Range(starting_cell,Ending_ Cell). 

For example, Range(“A1:C6″) means the specified range is from cell A1 to C6.

To select the specified range, the syntax is

Range(“A1:C6″).Select

where select is a method of the Range object

Learn more about the Range Object

Creating Animation in Excel VBA 2010

Beside creating Excel VBA 2010 code for business and scientific calculations, it is also possible to creating some fun applications in Excel VBA 2010, including animation. Although professionals programmers might not be interested to write such applications, it is worth while trying them out as a hobby and for personal satisfaction.

Read more….

Creating charts in Excel VBA 2010

Can we write code to create charts and graphs in Excel VBA 2010? Yes, you can. Excel VBA 2010 has included charting engine as part of the Shape object. It is also an object by itself. We can create charts on a sheet of their own or embed them into an existing worksheet. The chart sheet is the Chart object whereas the embedded chart is part of the shape collection for the worksheet.

Read More……

Introduction to Excel VBA 2010

Is creating Excel VBA in MS Excel 2010 as easy as in Ms Excel 2003 and older versions? The fact is Microsoft Excel 2010 looks similar to Microsoft Excel 2007 but both are considerably different from Microsoft Excel 2003. MS Excel 2010 employs interactive ribbon controls for the menu bar instead of the old menu structure. Fortunately, the Visual Basic Editor (VBE) remains largely the same as that of version 2003. However, finding the active-x controls on the ribbon control is not as obvious as in Microsoft Excel 2003. Learn how to create Excel VBA in MS Excel 2010 by following the link below:

http://excelvbatutor.com/index.php/excel-vba-2010-tutorial-lesson-1-introduction-to-excel-vba-2010-editor/

Excel VBA Functions

In Excel VBA, a function is similar to a procedure but the main purpose of the function is to accept a certain input from the user and return a value which is passed on to the main program to finish the execution. There are two types of functions, the built-in functions (or internal functions) and the functions created by the programmers, or simply called user-defined functions. We shall deal with built-in functions in this lesson and the user-defined functions in the next lesson.

Read On…..

Excel VBA Methods

A method of an Excel VBA object normally do something or perform certain operations. For example, ClearContents is a method of the range object that clears the contents of a cell or a range of cells. For example, You can write the following code to clear the contents of certain range:

Read on…….