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

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

问题描述

我有一个在VBA/Excel中开发的旧应用程序,该应用程序使用ListView控件.不幸的是,它看起来像这些控件无法与64位版本的Excel一起使用:

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:

Office 2010中的本机64位进程无法加载32位二进制文​​件.这包括MSComCtl的通用控件[例如ListViews]. 对于将代码迁移到64位Office 2010时使用这些控件的现有Microsoft Office VBA解决方案,必须找到替代方法.

我需要将该旧版应用程序迁移到Excel 2010/13 x64.除了那些ListView控件之外,该过程几乎没有痛苦.

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

我有哪些主要的替换ListView控件的选项,哪一种最有效(从实现时间和难度的角度来看)?

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

注意:

  • 已在
  • 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.

为清楚起见,这是Excel用户表单的快照.底部是列表视图(我已隐藏了机密信息),该视图具有可排序的列,允许用户选择多行非连续行.

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.

推荐答案

理论上可行的一件事是将显示代码编写为.Net程序集,并通过COM从您的VBA代码访问它(例如,参见如何使用在Excel VBA中进行操作?作为执行此操作的起点).

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

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

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天全站免登陆