Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
VBA Automation for Excel 2019 Cookbook
VBA Automation for Excel 2019 Cookbook

VBA Automation for Excel 2019 Cookbook: Solutions to automate routine tasks and increase productivity with Excel and other MS Office applications

eBook
€8.99 €28.99
Paperback
€35.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

VBA Automation for Excel 2019 Cookbook

Chapter 2: Working with the VBA Editor

The recipes in this chapter will familiarize you with the working environment of the Visual Basic for Applications (VBA) Editor. It is an integral part of all applications in the MS Office suite. In order to use the Editor effectively, we need to investigate all of its elements, features, and characteristics. Getting to know the VBA Editor components is vitally important for any potential VBA coder.

In this chapter, we will cover the following recipes:

  • Identifying, activating, and manipulating components in the VBA Editor
  • Creating a module for storing a Sub procedure
  • Creating a basic procedure in the code window of the Editor
  • Creating VBA code in the code window in three different ways
  • Customizing the Editor to suit your preferences

By the end of this chapter, you will be familiar with the working environment of the VBA Editor.

Technical requirements

This cookbook was written and designed to be used with MS Office 2019 and MS Office 365, installed on either Windows 8, 8.1, or 10.

In the case of MS Word, MS Excel, and MS PowerPoint, the VBA Editor can be activated by using the Alt + F11 keyboard shortcut. By pressing Alt + F11 a second time, you can switch between the Editor and the application you are working in.

Demonstration files can be downloaded from https://github.com/PacktPublishing/VBA-Automation-for-Excel-2019-Cookbook.

Please visit the following link to check out the CiA videos: https://bit.ly/3jQRvVk.

Identifying, activating, and closing components in the VBA Editor

The VBA Editor is the heart and soul of writing your code. In this recipe, we will examine the VBA Editor in detail in order to understand the layout and location of components. There are several components in the Editor, each with a specific function and purpose.

Getting ready

All applications in the MS Office Suite contain the VBA Editor as an integral part of the application. In this recipe, we will be working with Excel. If you do not have Excel installed on your PC or laptop, please install it now.

How to do it…

Let's take a look at the steps for this recipe:

  1. To get to the Editor, we first need to open Excel.
  2. With the home screen visible, also referred to as the welcome screen, select the first option, Blank workbook:
    Figure 2.1 – The welcome screen

    Figure 2.1 – The welcome screen

    A new Excel spreadsheet named Sheet1 is displayed. Since the file has not been saved, the workbook name, as displayed in the title bar, is Book1 - Excel:

    Figure 2.2 – Book1, Sheet1

    Figure 2.2 – Book1, Sheet1

  3. With Sheet1 active, the next step is to open the VBA Editor. This can be done in one of two ways:

    Click on the Developer tab, go to the Code group, and click on the Visual Basic icon.

    Use the keyboard shortcut, Alt + F11.

    Either way, the following screen will appear:

    Figure 2.3 – The VBA Editor

    Figure 2.3 – The VBA Editor

  4. Since there was no recorded macro, the code window will not be available. Press F7 to open a new code window or, if you want, click View on the menu bar, then select the first option, Code:
    Figure 2.4 – The VBA Editor with the code window

    Figure 2.4 – The VBA Editor with the code window

  5. With the VBA Editor open, we can now identify the different components:
Figure 2.5 – The VBA Editor components

Figure 2.5 – The VBA Editor components

How it works…

Figure 2.5 shows the VBA Editor and its components. Let's look at each component in detail.

The title bar

All applications in the Microsoft environment have a title bar. As the name suggests, it identifies the application you are working in. It also displays the familiar minimize, maximize/restore, and close buttons on the rightmost end:

Figure 2.6 – The title bar

Figure 2.6 – The title bar

The menu bar

All the latest Microsoft applications make use of ribbons to categorize icons and commands. Menu bars are, therefore, not all that common anymore. However, in the case of the VBA Editor, the menu bar has survived the test of time. It contains all the commands you need to work within the various components of the VBA Editor. Drop-down menus will also show shortcut keys for some of the commands:

Figure 2.7 – The menu bar

Figure 2.7 – The menu bar

The toolbar

The standard toolbar is displayed directly under the menu bar. There are three other toolbars, which can be activated by using the View | Toolbars command, or by right-clicking on the toolbar. All these toolbars can be customized and moved around, although most users leave the toolbars as they are:

Figure 2.8 - The toolbar

Figure 2.8 - The toolbar

The Project window

The Project window displays a tree diagram of the objects currently available in Excel. In this case, only one workbook with one sheet is open in Excel, meaning that only Sheet1 and ThisWorkbook will be displayed under Microsoft Excel Objects. To expand and collapse the objects under Microsoft Excel Objects, you can either double-click on the folder icon or click on the minus sign to the left of the folder icon.

To close the Project window, click on the close button on its title bar, and to open it, press Ctrl + R or View | Project Explorer:

Figure 2.9 – The Project window

Figure 2.9 – The Project window

The Properties window

The Properties window is displayed directly below the Project window. It does exactly what it says: it displays the properties of objects. When you click on the Sheet1 object in the Project window, the Properties window will display the related properties. The same happens when you select the ThisWorkbook object:

Figure 2.10 – The Properties window

Figure 2.10 – The Properties window

The code window

The code window is the place where the VBA code is stored. Every object in a project has its own code window. To view the code window for ThisWorkbook, double-click on the object. The same applies for the Sheet1 object.

Because we have not saved a macro or typed any code for any of these objects, the code window for both objects will be empty:

Figure 2.11 – The code window

Figure 2.11 – The code window

Like all windows, the code window can be restored (and maximized). By restoring both the code windows, you can either tile or cascade them:

Figure 2.12 – Cascading code windows

The Immediate window

When you open the VBA Editor the first time, the Immediate window is normally not visible. Use the View | Immediate Window command, or press Ctrl + G to display the Immediate window. Closing it requires clicking on the close button on the title bar.

If you are new to VBA, the Immediate window will not be of much use to you, since it is used to execute VBA statements directly, as well as for debugging your code. Until you have a bit more experience, feel free to close this window:

Figure 2.13 – The Immediate window

Figure 2.13 – The Immediate window

Creating a module for storing a Sub procedure

In this recipe, we will be creating a new module, which is yet another object, in the Project window. So far, we've seen only two objects in the Project window: Sheet1 and ThisWorkbook. It is possible to create a code window for each, but Sub procedures must be created and stored in a module in the Project window. This is where coding for all objects can be created and saved.

Getting ready

Make sure that Excel is open and that the VBA Editor is visible.

How to do it…

The steps for this recipe are as follows:

  1. With Excel open on a new sheet, select the Developer tab. In the Code group, select the Visual Basic icon to activate the VBA Editor. If you prefer using the shortcut key, simply press Alt + F11.

    In the VBA Editor, observe the Project window. Under Microsoft Excel Objects, only two objects are visible: Sheet1 (Sheet1) and ThisWorkbook.

  2. On the menu bar, select Insert. From the drop-down menu, select Module, as shown:
Figure 2.14 – The Insert menu's Module option

Figure 2.14 – The Insert menu's Module option

Once you've made your selection, the VBA Editor adds a new module – visible in the Project window – and a new code window appears on the right:

Figure 2.15 – Newly inserted module

Figure 2.15 – Newly inserted module

How it works…

When you open a new spreadsheet in Excel and then activate the VBA Editor, no modules will be visible in the Project window.

However, should you record a macro and then activate the VBA Editor, that macro will be stored in a module.

Finally, if you choose not to record a macro, but to insert the code yourself, you have to create a module yourself.

Creating a basic procedure in the code window of the Editor

In this recipe, we will create a basic procedure in the code window of the Editor. We're at the point where everything is coming together now; you know the different components, and you know how to create a module. All that's left is to create code – a simple Sub procedure – in the newly created module.

Getting ready

Make sure that you've created a module in the VBA Editor. The module should be visible as an object in the Project window, and the title bar of the code window should display the name Module1 (Code). If you cannot see the title bar, click on the restore window button to make the window smaller.

How to do it…

Let's go through the steps for this recipe:

  1. In the code window, type the following code:
    Sub MyName()
        MsgBox "My name is Yourname" (Replace Yourname _
        with your first name.)
    End Sub
  2. Press Alt + F11 to switch to Excel.
  3. Click on any cell of the active sheet. Go to Developer | Code, and click on the Macros icon. The Macro dialog box appears:
Figure 2.16 – The Macro dialog box

Figure 2.16 – The Macro dialog box

The only available macro is the one that you've just created; MyName. Click on the Run button.

A message box will appear with the words My name Mike, as shown:

Figure 2.17 – Message box from a basic procedure

Figure 2.17 – Message box from a basic procedure

A much shorter way to execute the code is to press F5 while in the VBA Editor. You will automatically switch to Excel, where the message box will be displayed.

How it works…

Entering code in the VBA Editor is relatively simple, on the condition that you have a basic understanding of VBA coding. Looking at a few code samples online before going solo is advisable, and will save you many hours of frustration.

As a bonus, the Editor will make adjustments to the text you enter. The first example of this is when you type the Sub statement and the name of your procedure. When you press Enter, the Editor automatically inserts the End Sub statement. As we progress, you will see how spaces are inserted, and how capitalization and text colors are changed.

Once your code is error-free, the code can be run. In this case, the outcome is a message box, displaying the words My name Mike.

Creating VBA code in the code window in three different ways

Our first Sub procedure was as simple as it gets. It wouldn't take much imagination to understand that coding can become more complex than that. If that's the case, it makes you wonder how long it would take to manually type the coding for super-long Sub procedures.

All depending on the situation, there is more than one option to create coding. In this recipe, we will investigate the different methods to create code.

Getting ready

With Excel open, activate a worksheet in the workbook.

How to do it…

We will now go through the steps of working with each method to create code.

Recording a macro and then opening the VBA Editor to view the code

When using this method, you'll need to perform the following steps:

  1. Fill the range A1:A10 with any numerical value. In this case, I filled the range with the value 100. Once done, click on cell A1:
    Figure 2.18 – Fill the range A1:A10

    Figure 2.18 – Fill the range A1:A10

  2. Navigate to Developer | Code and click on Record Macro. The Record Macro dialog box appears. Give the macro a name and shortcut key, and type a short description, as shown:
    Figure 2.19 – The Macro dialog box

    Figure 2.19 – The Macro dialog box

  3. Click on OK to start recording the macro. The first step is to highlight the range A1:A10. Then, format the range as Accounting by using the drop-down list from Home | Number, as shown:
    Figure 2.20 – Formatting the range

    Figure 2.20 – Formatting the range

  4. Once the formatting is done, stop the recording from Developer | Code by clicking on Stop Recording.
  5. Now, view the code. Press Alt + F11 to display the VBA Editor. Double-click on Module1 to open the code window:
    Figure 2.21 – Code for the recorded macro

    Figure 2.21 – Code for the recorded macro

  6. To test the macro, press Alt + F11 to switch back to Excel. First, clear the formatting on range A1:A10. To clear the formatting, select the range. Then, go to Home | Editing | Clear | Clear formats. Click any cell on the sheet, then run the macro. The range A1:A10 will be formatted as Accounting.

Entering the code manually by typing

In this method, we will be typing the code manually using the following steps:

  1. While still in the VBA Editor, click on Insert, then select Module.
  2. A new module will appear in the Project window. Double-click on the Module icon to open the corresponding code window.
  3. Type the following code:
    Sub MsgBoxOKCancel()
        MsgBox "Do you want to continue?", vbOKCancel
    End Sub
  4. To run the code, press F5. The Excel spreadsheet will appear, with a message box on the screen. When you click on OK, you will switch back to the VBA Editor.

Copying and pasting

When you work in MS Word and want to copy text from one document to the other, you need both pages to be open. The same applies for code in VBA.

Open the module with the code you want to copy, as well as the one where you want to paste it. Select the code in the first module – use Ctrl + C, or right-click and Copy – then switch to the new module. Ctrl + V will paste it, or you can right-click and select Paste.

How it works…

Now let's see how each method works.

Recording a macro, and then opening the VBA Editor to view the code

Many Excel users are introduced to the world of VBA coding after recording a macro or two. Looking at the recorded steps and starting to understand how VBA works is quite exciting.

If you have to record a series of steps in Excel, there is no better or faster way to create the code than with a macro.

Entering the code manually by typing

It normally comes as a shock when you realize that not all coding can be done with the macro recorder.

Take, for instance, the message box we created with the sample code. There is no way to create that message box other than manually typing the code.

If you are new to VBA, typing code manually might sound like a challenge. However, with a little bit of experience, you will soon be able to type lines of code like a professional.

Like with any other typing, you can cut, copy, paste, and delete text in the Editor. To make the code easier to read, indent some of the lines with the Tab key. Don't forget that undo and redo can also be used!

If a single line becomes too long to read on one screen, use a space and an underscore (_) to break to a new line.

Copying and pasting

This sounds like the lazy man's escape, but there are many good reasons for copying code. Firstly, if you created a Sub procedure for another project that can be used in your current project, it would be a waste of time to retype it.

You will also find many examples of VBA code on the internet. This is a very good way of learning from people with experience.

There's more…

To make the macro we recorded a bit more useful, do the following:

  1. In the VBA Editor, copy the Currency_Format Sub procedure and paste it directly below the last line.
  2. Still in the Editor, rename it to Range_Format.
  3. Now, delete all the notes in the Range_Format procedure.
  4. Finally, delete the line that selects the range A1:A10.

Your code should now look like this:

Figure 2.22 – Altered code

Figure 2.22 – Altered code

If you switch back to Excel, you can now use the second macro to highlight any range and format it to accounting.

Customizing the Editor tab to suit your preferences

In this recipe, we will change settings in the Editor tab to suit your preferences.

Getting ready

Make sure that the VBA Editor is visible.

How to do it…

In order to proceed with executing this recipe, you need to go through the following steps:

  1. With the VBA Editor active, choose Tools | Options from the menu bar. The Options dialog box will appear as shown here:
    Figure 2.23 – The Options dialog box

    Figure 2.23 – The Options dialog box

  2. In the Options dialog box, click on the Editor tab, if it is not already selected.

    There are two sections: Code Settings and Window Settings. In each of these sections, you will find several boxes, some with tick marks and others empty.

  3. Click in any of these tick boxes to select or deselect the option, as described to the right of the tick box:
    Figure 2.24 – The Editor tab

    Figure 2.24 – The Editor tab

  4. Click on the Editor Format tab to activate it. With this tab, you can customize the way the Editor looks.

    Here, you will find three sections: Code Colors, Font, and Sample.

    The options under Code Colors can be customized by selecting a different color under Foreground, Background, and Indicator for each of the code elements.

    The font and size can be changed by selecting either Font or Size, while a sample will display the effect of your choices in the Sample section, as shown:

    Figure 2.25 – The Editor Format tab

    Figure 2.25 – The Editor Format tab

  5. Click on the General tab to activate it. This is where the less dedicated settings can be made.

    In this area, you will find four sections: Form Grid Settings, Edit and Continue, Error Trapping, and Compile.

    Once again, changes can be made by either selecting or unselecting tick boxes, as shown:

    Figure 2.26 – The General tab

    Figure 2.26 – The General tab

  6. Click on the Docking tab to activate it. The only purpose of this tab is to set the behavior of the different windows in the VBA Editor.

    There is only one section with a list of tick boxes, each with a description:

Figure 2.27 – The Docking tab

Figure 2.27 – The Docking tab

How it works…

We will now have a quick look at what customizing these tabs entails.

The Editor tab

The default settings are default for good reasons and speak for themselves, in most cases. There are two possible changes I would suggest, which are as follows:

  • The Auto Syntax Check: For novice users, this option is indispensable, so keep it as it is. For people with more experience, the pop-up dialog box that appears when it discovers a syntax error in the code can be irritating. You choose what you prefer.
  • Default to Full Module View: Many coders prefer to see a maximized code window. However, if you know that you're going to work in multiple modules, it is sometimes nice to have the code window in restore down mode so that you can easily select and move between them.

The Editor Format tab

With this tab, you can customize the way the Editor looks. Once again, these settings are the default because they've been tried and tested.

So, unless you are working for a multi-national company where the project managers have developed their own color settings, I would strongly advise that you stick to the factory settings.

The General tab

In almost every case, the default setting will be best. There is, however, one setting that must be mentioned, and that is Error Trapping. The default setting is Break On Unhandled Errors. If you switch this off, your error handling code will not work. More on this will be covered later in the book.

The Docking tab

As said, these settings determine window behavior in the VBA Editor. When a window is docked, it is fixed in place in the VBA program window, meaning that your environment is fixed and familiar.

If you turn off all docking, windows in the VBA Editor can potentially become a confusing mess of floating screens. In this case, I would strongly advise against undocking windows.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Extend the capabilities of Excel and other Office applications with the help of Microsoft VBA
  • Take your Excel programming skills to the next level by creating custom applications with dialogue boxes and the range object
  • Automate repetitive and monotonous office work with VBA Excel programming

Description

Visual Basic for Applications (VBA) is a programming language developed by Microsoft to automate tasks in MS Office applications. This book will help you to focus on the essential aspects of your role by automating mundane tasks in Excel and other Office applications. With comprehensive coverage of VBA delivered in the form of practice problems and bite-sized recipes, this book will help you to hit the ground running. Unlike most books that assume prior programming experience, this book starts with the fundamentals and gradually progresses to solving bigger problems. You’ll start by becoming familiar with VBA so that you can start recording macros right away. With this foundation in place, you’ll advance to using the full capabilities of the language as you apply loops, functions, and custom dialog boxes to design your own automation programs. You'll also get to grips with embedded macros and other advanced tools to enhance productivity and explore topics relating to app performance and security. Throughout this VBA book, you’ll cover multiple practice projects in Excel, Word, and PowerPoint while exploring tips and best practices to hone your skills. By the end of this book, you’ll have developed the skills you need to use VBA to create your own programs that control MS Office applications.

Who is this book for?

This book is for experienced Excel users, business analysts, finance professionals, and business users looking to boost their productivity by learning VBA programming to automate repetitive, tedious, or complex tasks. No prior programming experience is required to get started with this book.

What you will learn

  • Understand the VBA programming language's role in the context of the MS Office suite
  • Discover various aspects of VBA programming such as its terminology, syntax, procedures, functions, and forms
  • Investigate the elements, features, and characteristics of the VBA Editor to write and edit custom scripts
  • Automate Excel sheets with the help of ranges
  • Explore error handling and debugging techniques to catch bugs in your programs
  • Create and use custom dialog boxes to collect data from users
  • Customize and extend Office apps such as Excel, PowerPoint, and Word
Estimated delivery fee Deliver to Switzerland

Standard delivery 10 - 13 business days

€11.95

Premium delivery 3 - 6 business days

€16.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 18, 2020
Length: 362 pages
Edition : 1st
Language : English
ISBN-13 : 9781789610031
Vendor :
Microsoft
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Switzerland

Standard delivery 10 - 13 business days

€11.95

Premium delivery 3 - 6 business days

€16.95
(Includes tracking information)

Product Details

Publication date : Sep 18, 2020
Length: 362 pages
Edition : 1st
Language : English
ISBN-13 : 9781789610031
Vendor :
Microsoft
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 85.97
Hands-On Financial Modeling with Microsoft Excel 2019
€29.99
VBA Automation for Excel 2019 Cookbook
€35.99
Exploring Microsoft Excel's Hidden Treasures
€19.99
Total 85.97 Stars icon
Banner background image

Table of Contents

19 Chapters
Chapter 1: Getting Started with VBA Chevron down icon Chevron up icon
Chapter 2: Working with the VBA Editor Chevron down icon Chevron up icon
Chapter 3: The VBA Object Model Chevron down icon Chevron up icon
Chapter 4: Working with Procedures Chevron down icon Chevron up icon
Chapter 5: Next Level Recording Chevron down icon Chevron up icon
Chapter 6: VBA Language Elements Chevron down icon Chevron up icon
Chapter 7: Working with Ranges Chevron down icon Chevron up icon
Chapter 8: Using Functions Chevron down icon Chevron up icon
Chapter 9: Implementing Program Flow Chevron down icon Chevron up icon
Chapter 10: Implementing Automation Chevron down icon Chevron up icon
Chapter 11: Handling Errors Chevron down icon Chevron up icon
Chapter 12: Debugging Chevron down icon Chevron up icon
Chapter 13: Creating and Modifying Dialog Boxes Chevron down icon Chevron up icon
Chapter 14: Creating UserForms Chevron down icon Chevron up icon
Chapter 15: UserForm Controls Chevron down icon Chevron up icon
Chapter 16: Creating Custom Functions Chevron down icon Chevron up icon
Chapter 17: Creating Word Documents with Excel VBA Chevron down icon Chevron up icon
Chapter 18: Working with PowerPoint in Excel VBA Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(15 Ratings)
5 star 53.3%
4 star 13.3%
3 star 13.3%
2 star 0%
1 star 20%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Dec 29, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Perfect book that takes you through various steps with VBA programming.
Amazon Verified review Amazon
William Davis Feb 27, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
My all-time favorite in this area.
Amazon Verified review Amazon
Everett Salazar Jan 31, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book, very easy to follow with great examples.
Amazon Verified review Amazon
Gudaben Feb 18, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Thank you fast shipping! Nice book , good condition.
Amazon Verified review Amazon
Alan Oct 21, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It takes you from how to record a macro to writing subs, functions, and procedures. I won't make you an expert overnight, but gives you the knowledge you need to start writing your own code to help you automate your excel spreadsheets.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela