You can programmatically enable trust access to the VBA project object model with this macro. Doing so allows you to add modules and write macros from a macro.
This tutorial shows you how to pause your macro until a key is pressed by calling the GetAsyncKeyState function in VBA. Use it to detect any key stroke.
We've combined each of our comprehensive wellsrPRO VBA training reference guides into a single bundle with over 180 tips and macros covering the 100 most important topics in VBA.
Tell me more
Learn how to restrict a VBA UserForm TextBox to numbers only using the VBA KeyPress event and KeyAscii argument. Negative numbers and decimals are also allowed.
The ShowModal VBA property controls how a UserForm behaves when displayed. UserForms can be shown as vbModal or vbModeless by setting the ShowModal property.
This tutorial shows you how to declare and initialize a VBA array of strings using the Split function. This array of strings solution is compact and efficient.
Use Excel to record your mouse clicks and cursor movements and convert them directly into VBA macros so you can easily automate complex tasks, like copying data from a website.
Extract a VBA substring from a string using the Mid function. VBA Mid accepts 3 arguments to define which substring you want to extract from your main string.
The PDF VBA Excel Add-in automatically converts your Excel sheets, ranges, tables and charts to PDFs. Rapidly export Excel objects into one or separate PDFs.
The VBA FreeFile function reserves the next available file number for VBA file IO. FreeFile returns an integer that you can use to open, read and write files.
Loop through the alphabet with the Excel VBA Asc and VBA Chr functions. Copy and paste this flexible macro into your own project to loop through the alphabet.
The VBA RTrim function is a fast way to remove trailing spaces, but what if you want to trim all trailing whitespace, like new line characters and tabs?
subscribe via RSS
Grab a copy of our VBA Developer's Kit and start writing better macros in half the time.