Blog about free ebook which contain blogging books, business books, marketing books, social media books, programming books

Search:

Custom Search

Friday, February 24, 2017

The Excel VBA Programming Tutorial for Beginners

No comments :
If you’re using Excel, you have to try this power tool!

Visual Basic for Applications (VBA) is the Microsoft Office programming language that allows you to create macros and userforms, add a message box, execute code inside a document in response to a trigger, and much more. With VBA you can supercharge your Excel spreadsheets. And you just have to learn a little bit about coding.

This guide will help you try your hand at VBA with a simple project: a button that converts the value of a chosen cell from GBP to USD. We will introduce you to the ways that VBA and Excel can intersect. This short tutorial will put you on a path toward creating your own more complex projects.

Here’s how to get started with VBA in Excel 2016 (CA/UK).

Access Developer Controls

Before we can dive into VBA, it might be necessary to open Excel and adjust the settings to
display the Developer tab as part of the Ribbon. To do so, head to File > Options > Customize
Ribbon.

Create a Button

To create our currency converter, we first need to insert the button element. In a second step,
we’ll attach our VBA code to that button.

Open a new Excel spreadsheet, then navigate to the Developer tab. Use the Insert dropdown in
the Controls section to select an ActiveX Command Button.

Drag the button out to an appropriate size and place it somewhere convenient — you can
easily change this later on.

Now we’ll attach the code. Right-click the button and select Properties. We’ll make two changes;
we’re going to change the Name that we’ll use to refer to the button while coding, and the
Caption that displays text on the button itself. You can choose whatever you like for these
labels, but remember that you’ll need to swap out ConverterButton for whatever you use in its
place while we’re adjusting the code.

Download here 


No comments :

Post a Comment