If you need to interface with some sort of external command line program during your macro, you may want to do that using powershell as you normally would if you were running the program using the command line yourself. Once run, you may need to obtain a result from this command. I recently had to do this myself when working with the Google Translate API using VBA. This is easy to do in VBA. Checkout the below example, using a PowerShell command from VBA to get the user’s free disk space.
Continue reading “How to Use VBA To Run a Powershell Command and Get Return Value”Tag: vba
Excel VBA Google Translate Function
In this article, you will learn how to implement a Google Translate function in Excel VBA. The function will use the Google Cloud Translation API. The API is free for a small amount of usage, after that you will need to pay to use the API but it is relatively inexpensive. More information is available on the Google Cloud Translation API Pricing here. Unfortunately, due to interfacing with Powershell, be aware that this tutorial is only functional without modification on Windows.
Continue reading “Excel VBA Google Translate Function”