Hey all,

I haven't had a lot of experience with VBA (Excel), but I think I have done enough research, so now I'm coming here for assistance.

I need my VBA macro to use a keystore, so I was going to use System.Security.Cryptography.X509Certificates.Import. My issue is however, I cannot add a reference to System.Security.dll in my macro. I get the generic "Cannot add reference to file", and a google search gets results for custom dll files, but this is a .NET library, so I don't know why there would be an issue.

Other libraries, e.g. System are listed as available,

Thanks for any assistance.

Recommended Answers

All 3 Replies

VB6, to the best of my knowledge.... is NOT .NET friendly. That said, have you tried putting a declaration to it (just like an API call)?

Yeah, I was thinking there would be some VB vs .NET issues. I tried importing the namespace, but it doesn't like it too much.

I found a different library which I could use, thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.