The VBA GoSub statement allows you to jump to a specified line label basis the numeric value of the provided expression. The expression must be numeric and evaluate to only numbers between 0 and 255 (others will cause exceptions). We will start with a simple example: The output will be: As you will notice the […]
Tag: Macro
VBA Paste from Excel to PowerPoint
In this post we will explore how VBA paste from Excel to PowerPoint objects such as a Range, Chart or other element. Below you will find working code snippets. We will learn also to modify this routine to address different VBA Copy Paste from Excel to PowerPoint. VBA Paste Range from Excel to PowerPoint We […]
VBA Run Macro on All Files in a Folder / All Worksheets in a Workbook
A very popular Excel automation scenario is the need to a VBA run macro on all files in a folder or running VBA on all Worksheets in an Excel Workbook. This is a very typical case where you process similar data dump files and want to extract data or transform the workbook. In this post […]
How to unhide sheets in Excel? Unhide all Sheets in Excel VBA
To unhide Sheets in Excel you need to right click on the Worksheet tab and select the Worksheet you want to unhide from the Unhide Window. I will start by showing a way to manually unhide an Excel Worksheet using the Excel Unhide Window. Then I will show you a few tricks of how to […]
VBA Tips and Tricks
Instant Print in the Immediate Window Use the “?” preceding a line of code that can evaluate to a value in the VBE Immediate Window. Hit Enter to evalute the code in the next line. See example below: This is a VBA Trick I was not aware for a lot time but saves a lot […]