Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for alternatives to 32-bit only Microsoft Common Controls (ListView)

Tags:

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.

enter image description here

like image 355
assylias Avatar asked May 28 '13 12:05

assylias


1 Answers

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.

like image 124
confusopoly Avatar answered Oct 06 '22 16:10

confusopoly