Create shapes and change their color, shape with PowerPoint VBA

You can use Visual Basic for Applications (VBA) to automate repetitive tasks and add dynamic content to your presentations. One good example is to create and customize shapes. In this tutorial, i will show how to add a shape, change its properties like color and size, and manipulate it further using PowerPoint VBA. Open your … Read more

How to Use Variables in VBA MsgBox and InputBox in Excel and Word?

In this tutorial, we will explore how to utilize variables with the msgbox and inputbox functions to create dynamic dialog boxes. The code provided below will run in Microsoft 365 (or earlier) Excel, PowerPoint and Word applications. Using variables with MsgBox and InputBox can make your VBA dialog interactions more dynamic and user-friendly. In this … Read more

How to Save Excel sheets as PDF with Current Date Using VBA?

If you often find yourself converting Excel reports to PDF format and manually typing in the current date to keep your file versions in order, you will find this trick pretty useful. We will use VBA (Visual Basic for Applications) to automate this task, saving you time and reducing the risk of errors. #1: Prepare … Read more

How to set Excel text font color with VBA?

In this tutorial we’ll learn how to use Visual Basic for Applications (VBA) to modify text size and style in an Excel cell based on the cell content. Preliminaries Before you start coding, you should enable your developer tab on Excel in the Ribbon, as otherwise you won’t be able to access your Visual Basic … Read more

How to set an Excel cell color according to a condition with VBA?

Applies to: Microsoft Excel 365, 2021, 2019, 2016. In today’s VBA for Excel Automation tutorial we’ll learn about how we can programmatically change the color of a cell based on the cell value. We can use this technique when developing a dashboard spreadsheet for example. Step #1: Prepare your spreadsheet If you are not yet … Read more

How to set an Excel spreadsheet column width with VBA?

Excel 365, 2019, 2016. In today’s Excel automation tutorial we will learn how to quickly change the width of a worksheet column as needed – but programmatically using VBA (Visual Basic for Applications). Prerequisites In order to write VBA code, you’ll need to first and foremost, ensure that your developer tab is enabled. If you … Read more

How to make a Macro in Microsoft Visio?

Here’s a question from Danny: I have recently started using Microsoft Visio to make use of diagrams, layouts, and charts. I understood that i can improve my productivity by automating much of the common work across different diagram / drawing files by using Office Macros. As i am pretty new to VBA development, i would … Read more