twinBASIC Update: April 24, 2022

Highlights include updated samples for building custom VBIDE tool windows and custom ActiveX controls that you can drop on Access forms and reports.

twinBASIC Update: April 24, 2022

On April 23, 2021, I helped Wayne Phillips introduce the world to twinBASIC at the Access DevCon Vienna conference.  I boldly predicted that twinBASIC (along with the Monaco editor) would replace VBA and its outdated development environment by 2025.  With that goal in mind, this weekly update is my attempt to keep the project fresh in the minds of the VBA development community.

Every Sunday, I will be providing updates on the status of the project, linking to new articles discussing twinBASIC, and generally trying to increase engagement with the project.  If you come across items that should be included here, tweet me @NoLongerSet or email me at mike at nolongerset dot com.

Here are some links to get involved with the project:


Improved Template for Building VBE Addins

The twinBASIC Sample 4. MyVBEAddin now includes sample code to create a ToolWindow within the VBA editor.

I will be writing a step-by-step HOW-TO article on the technique shortly, but honestly, the sample is pretty self-explanatory.  If you've used tools like Rubberduck VBA or MZ-Tools, you know how much a good VBE addin can boost your productivity.

With twinBASIC, it's now possible for mere mortals to build these sort of custom tools for themselves.  

The other nice thing about building VBE addins is that you don't have to worry about deploying them to end users, the way you do with ActiveX controls or COM addins that you reference from within your application code.

VBE addins are a great way to explore the power and possibilities of twinBASIC.

Around the Web

Creating Custom ActiveX Controls with twinBASIC

I published a short how-to article yesterday with step-by-step instructions to create a custom ActiveX control that you can add to forms or reports in Microsoft Access (and, I assume, UserForms in other Office applications like Excel):

HOW TO: Create a Custom ActiveX Control with twinBASIC
Did you ever wish you could build a custom control for Microsoft Access forms and reports? With twinBASIC, that’s a 15-minute project.

twinBASIC Comes to Madrid

My friend Juanjo Luna invited me to present twinBASIC to the Spanish-speaking Access User Group on Saturday, June 18, 2022.  

The conference is in-person at the Hotel Preciados in Madrid, though I will likely be presenting virtually.  My two years of high school Spanish are nowhere near enough for me to give this presentation in Spanish (at least not without hopelessly confusing everyone), so I will be presenting with the help of an interpreter.  

If you are a Spanish-speaking reader that can make it to Madrid, I look forward to "seeing" you there.  


Here are the updates from the past week.  You can also find this information by installing the twinBASIC VS Code extension and clicking on the Changelog tab of the extension page:

Nothing in the VSCode change log this week.

The VS Code twinBASIC extension is currently running v0.14.36 of the twinBASIC compiler.  Compiler updates will start getting pushed to the VS Code extension "next week (and then kept in-sync with the compiler updates once again)."

In the meantime, I'm going to list the changes to the IDE beta releases as detailed in GitHub.


BETA 23 is now available:

  • fixed: attempting to load Sample 5 (MyCOMAddin) caused an 'unhandled error' message [ IDE -- BETA RELEASE #772#issuecomment-1107447869 ]
  • fixed: default member recursion is now detected at the call site, and an appropriate error is produced [ default member evaluation sends the compiler into an endless loop #807 ]
  • fixed: IDE minimize/maximize/restore by toggling from the Windows taskbar now works as expected
  • fixed: IDE window snapping with the Windows+Arrow keys now working as expected
  • fixed: all samples and new projects now generate new GUIDs (for projectId and class CLSIDs) when first created
  • fixed: 'ActiveX Control' project and 'Sample 4' tB image control had Stretch = False set on it


BETA 22 is now available:

  • improved: initial WebView2 probe now allows upto 10 seconds before assuming an installation error
  • fixed: removed the '222' debug messagebox when using some controls


BETA 21 is now available:

  • fixed: if WebView2 is not installed, an informative error message is now displayed on opening the IDE
  • fixed: all default Monaco key bindings not working when F8 key was being used for debug stepping
  • fixed: EXE/DLL codegen invalid when involving late-bound calls to Err members
  • fixed: EXE/DLL codegen invalid when involving late-bound calls to PropertyBag members
  • fixed: project-save sometimes left the project in an inconsistent state, requiring a restart of the compiler
  • fixed: spurious 'circular reference' errors when editing a form design
  • fixed: resizing a form in the form designer caused display glitches
  • added: attribute [ COMControl ], and DllRegister support for it
  • added: VBA.Compilation.CurrentComponentCLSID member
  • added: Err.ReturnHRESULT member, useful for returning non-error HRESULTs
  • added: shortcut key of F9 for toggling breakpoints
  • added: new project type of 'ActiveX Control'
  • updated: sample 4 (MyVBEAddIn) to demonstrate an ActiveX ToolWindow in the VBA IDE

All original code samples by Mike Wolfe are licensed under CC BY 4.0