寻找仅 32 位 Microsoft 通用控件 (ListView) 的替代品 [英] Looking for alternatives to 32-bit only Microsoft Common Controls (ListView)

查看:30
本文介绍了寻找仅 32 位 Microsoft 通用控件 (ListView) 的替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 VBA/Excel 中开发的遗留应用程序,它使用 ListView 控件.不幸的是,看起来 作为如何执行此操作的起点).

这样您就可以为您的控件编写 .Net 代码.我自己还没有这样做,不确定它对您的问题的适用程度,但它看起来是一个选项.

我刚刚找到了一个 简短教程,用于从 Excel 调用 .Net.

I have a legacy application developed in VBA/Excel which uses ListView controls. Unfortunately, it looks like these controls can't be used with 64-bit versions of Excel:

Native 64-bit processes in Office 2010 cannot load 32-bit binaries. This includes the common controls of MSComCtl [such as ListViews]. An alternative must be found for existing Microsoft Office VBA solutions that utilize these controls when the code is migrated to 64-bit Office 2010.

I need to migrate that legacy application to Excel 2010/13 x64. The process is mostly painless except for those ListView controls.

What are my main options to replace the ListView control and which would be the most effective (from a time&difficulty to implement perspective)?

Notes:

  • This issue has been raised on MS forums but no practical answer has been given.
  • adding .net tag as I suspect some solutions could come from there.

To make it clearer, here is a snapshot of the Excel user form. The bottom part is the list view (I have hidden confidential information), which has sortable column, allows the user to select multiple, non-consecutive, lines.

解决方案

One thing that is theoretically possible would be to write your display code as a .Net assembly and access that via COM from your VBA code (see for example How can I make use of .NET objects from within Excel VBA? as a starting point for how to do this).

That way you can write .Net code for your controls. I haven't done that myself and am not sure how well it applies to your problem, but it looks like an option.

I just found a short tutorial for calling .Net from Excel.

这篇关于寻找仅 32 位 Microsoft 通用控件 (ListView) 的替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆