Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Analysis and Business Modeling with Excel 2013

You're reading from  Data Analysis and Business Modeling with Excel 2013

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781785289545
Pages 226 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Data Analysis and Business Modeling with Excel 2013
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Data into Excel 2. Connecting to Databases 3. How to Clean Texts, Numbers, and Dates 4. Using Formulas to Prepare Your Data for Analysis 5. Analyzing Your Data Using Descriptive Statistics and Charts 6. Link Your Data Using Data Models 7. A Primer on Using the Excel Solver 8. Learning VBA – Excel's Scripting Language 9. How to Build and Style Your Charts 10. Creating Interactive Spreadsheets Using Tables and Slicers Tips, Tricks, and Shortcuts Index

Your very first "Hello World" VBA script


We are going to start with a very simple script and then get into coding some useful VBA code. To start with, we are simply going to create a macro that displays a message box when it runs. These sections will help you visualize the steps needed to code, create, and deploy your macros.

  1. Press the ALT + F11 keys to open the VBA editor in case you closed this window after our last section.

  2. Click on the Insert menu and select the Module option, as shown in the following screenshot. You need to create a module before you can begin writing any code. In other words, modules hold the VBA code.

    You will get a new window and have an object explorer that looks similar to the following screenshot. You can change the name of Module1, but for this section, we are going to keep the default name.

  3. Type the following code into the module:

    Sub Hello_World()
    
        ' My first VBA sub procedure
        MsgBox ("Hello World")
    
    End Sub

    Can you explain this code to me?

    On line one, we...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}