Of course it was compiled as VB.NET! Why did you closed the post before verify yourself that? Of course I disagree with closure! That code is part of much bigger project, and fits perfectly in it. The reason for looking the same code as the vba version is because the vba version was designed on purpose to be perfectly compatible with vb.net. And... its not the same! There are vb.net specific differences! So this is the method here: when somebody don't understand something he just proceed to cut it out? – Sorin GFS 5 hours ago
As the all-time top answerer in both vba and vb.net tags on this site, I think I know what I'm talking about when I say that your "VB.NET" code is VBA with enough lipstick to satisfy the .net compiler.
"VB.NET-specific differences" as you call them, aren't what @joranvar correctly identified in his answer.
I'm not going to review your code here, but this:
On Error Resume Next
LB = LBound(arr, selDim)
UB = UBound(arr, selDim)
Is clearly VBA code imported into VB.NET. I would also like to quote @Zak's latest answer:
Though I will say: It's been 3 iterations and you're still using
d as variable names for Data Arrays. Fix it.
This point is still valid on the 4th iteration. Reviewing someone's code and seeing that person post a "follow-up" question and completely ignore advice you've given in not one, not two, three answers already, is understandably irritating.
I know what you're after. You commented to that effect on October 3:
I assume all your critics. But, please, could we concentrate on functionality? – Sorin GFS Oct 3 at 13:28
What reviewers have been saying for 3 iterations, is that as external people looking at your code for the first time, they're having a hard time making sense of the single-letter identifiers and the meaningless variable names - code that's hard to read is hard to functionally improve because it's hard to follow. By ignoring the readability feedback you've been getting, you've basically worn your reviewers out, and posting a 4th iteration in VB.NET (to reach a new set of reviewers?) will not change anything: you will STILL get the SAME answers addressing your meaningless identifier names.
Same code, different tag, same answers - except, if reviewed as vb.net, it would literally get shredded for being VBA-with-lipstick, as it's not leveraging any of the .NET framework.
TL;DR: I stand by my close-as-dupe decision. Implement it in actual .NET code if you want it reviewed by a .NET crowd.