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:
.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With