FYI - Sounds like for what you're doing moving to a later version of Access
is a moot point. Also, all of the various versions of Access are releases
with a freely downloadable & redistributable (sp?) version of Access. There
are some limits with the runtime version, but for the most part they
shouldn't be an issue. In short, the only up-front cost to move to a new
version of Access is the copy that you'll need for development.
"(E-Mail Removed)" wrote:
> On Feb 3, 11:01 pm, Tom van Stiphout <tom7744.no.s...@cox.net> wrote:
> > On Tue, 3 Feb 2009 17:15:38 -0800 (PST), gardenofsim...@gmail.com
> > wrote:
> >
> > As you found out: it don't work that way. VBA cannot use .NET
> > assemblies directly.
> > In a similar situation we wrote a .NET assembly and gave it a COM
> > wrapper. THEN you can reference that DLL from Access and call its
> > public interface.
> >
> > -Tom.
> > Microsoft Access MVP
> >
> > >Hi everyone!
> >
> > >I just wanted some opinions before I gave up on this solution
> > >altogether and found another way. I know that there are many ways to
> > >solve this problem, it's just that this one seemed simple and elegant
> > >(until it didn't work!)
> >
> > >The givens are that a) I must use Access 2000 and b) I am stuck
> > >with .net Framework 2.0. I cannot upgrade either of these products.
> > >I'm sorry. I realize that upgrading both would most likely solve this
> > >instantly.
> >
> > >So: working within these constraints, what I wanted to do was write a
> > >very short VBA module to encrypt a few strings using the SHA512
> > >algorithm.
> >
> > >I wanted to use the SHA512 class from the System.Security.Cryptography
> > >namespace:
> > >http://msdn.microsoft.com/en-us/libr...y.cryptography....
> >
> > >However, I can't get it to work.
> >
> > >1) I can add mscorlib.dll as a reference.
> > >2) I can create an instance of SHA512 -- Dim x As New SHA512
> >
> > >The problem occurs when I try to use the ComputeHash method. The code
> > >y = x.ComputeHash(z) causes VBA to return the runtime error "Invalid
> > >procedure call or argument".
> >
> > >When I look at the SHA512 class in Object Browser, it contains no
> > >members. This is really puzzling to me.
> >
> > >So my question is: why would the Object Browser show no members and
> > >yet VBA is willing to let me create an instance of this class?
> >
> > >Is there something simple I'm missing here? Or is this never going to
> > >work.
> >
> > >Thanks for your help.
> >
> > >C.
>
> Tom thank you SO much for pointing me in the right direction. I
> thought I was going to go mad from not being able to figure out why.
>
> C.
>