Jack BeNimble
Jack BeNimble

Reputation: 36653

VBA: incompatible with .NET regex balancing groups?

I have been checking around as to whether I can use .NET regex balancing groups in an excel spreadsheet VBA function.

However, it appears that VBA is not compatible with, nor is it a part of .NET. For example, wikipedia bluntly states that "VBA is incompatible with Visual Basic .NET (VB.NET)".

So, just to be sure, w/r/t regex balancing groups, I'm out of luck in VBA, correct?

Upvotes: 3

Views: 229

Answers (2)

competent_tech
competent_tech

Reputation: 44931

You can actually use .Net to create Visual Studio solutions since at least Office 2003 using Visual Studio Tools for Office (VSTO).

Unfortunately, you have to jump through a couple of hoops and adhere to some restrictions to get it deployed, but it could potentially be easier than exposing and registering a COM object. This MSDN article has some good information about creation and deployment of VSTO solutions.

Upvotes: 5

GSerg
GSerg

Reputation: 78155

There's nothing wrong with writing a .NET object, exposing it to COM and using it from VBA.

"Incompatible" probably means the .NET code, pasted into a VBA editor, will not work.

Upvotes: 5

Related Questions