How to reference an old version of the VBA library?

夙愿已清 提交于 2019-12-07 17:35:33

问题


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

回答1:


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. :)



来源:https://stackoverflow.com/questions/58857654/how-to-reference-an-old-version-of-the-vba-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!