Search code examples
excelvbaexcel-2013

How to reference an old version of the VBA library?


I'm using Excel 2013. The VBA reference is part of Excel (built-in) so I can't remove it.

Is it possible to reference another version of the VBA library? The reason I want to know other than curiosity is to look at the object browser of the older versions to see if it lists some currently-hidden/obsolete properties/methods such as Excel.DialogSheet.

The Workbook.SheetActivate event has a Sh parameter of type Object. One of the possible sheet types is Excel.DialogSheet which should be checked with the TypeOf operator.

When I try to add another VBA reference I get the message: Name conflicts with existing module, project, or object library.

The default one being used is from:

  • C:\Program Files\Common Files\Microsoft Shared\VBA\VBA7.1\VBE7.DLL

The other references available are from:

  • C:\Windows\System32\msvbvm60.dll
  • C:\WINDOWS\system32\VEN2232.OLB

I also checked another computer with Excel 2003 that uses:

  • C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL

And has:

  • C:\WINDOWS\system32\VEN2232.OLB
  • C:\WINDOWS\system32\MSVBM50.DLL
  • C:\WINDOWS\system32\MSVBM60.DLL
  • C:\WINDOWS\system32\VBAEND32.OLB

Solution

  • Simple answer is no. Also, there is no need to. Just open the Object Browser, right-click something and choose 'Show hidden members'. You can then browse all the deprecated features like DialogSheet to your heart's content. :)