Convert negative values treated as text using VBA in Microsoft Excel

In this article, we will create a custom-function to convert negative strings to an integer. Raw data for this article consists of strings followed b...

Basic information about OLE automation using VBA in Microsoft Excel

When you want to use functionality from other applications you have to decide if you want to use early or late binding of object variables. Early ...

Playing WAV-files using VBA in Microsoft Excel

It's easy to play soundfiles in WAV-format. You only need to know the filename of the sound you want to play, and decide if you want the macro to wai...

Playing MIDI-files using VBA in Microsoft Excel

Soundfiles in MIDI-format are often long, so it might be necessary to stop playing the sound (e.g. when the macro is finished). Here is an example: ...

Determine the type of operating system using VBA in Microsoft Excel

To identify the type of OS, we can use macro code. In this article we will learn how to determine the type of operating system being used using VBA co...

Restore the position in the window using VBA in Microsoft Excel

If you want to restore the screen picture for the user after a macro has changed the window view, you can sometimes just activate the cell that was t...

Determine the screen size using VBA in Microsoft Excel

With the macro below you can return the screen size with the function GetSystemMetrics32. Declare Function GetSystemMetrics32 Lib "User32" _ Ali...

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.