Still working on this problem from another thread.
I have a third party COM object DLL called ImageMagick, I’ve registered the DLL with RegSvr, and I’ve been using it by declaring an object variable and setting a reference within an individual sub. It has a “convert” command that saves a file and responds with a text string with details about the file it just saved. So as such it is a “function” in VBA (right?), I call it like this:
Dim objIM as object
Set objIM = CreateObject("ImageMagickObject.MagickImage.1")
strIMResult =objIM.convert(“c:\File1.jpg”,”c:\File2.jpg”)
That all works.
Now I need to use it with a variable number of files. In the other conversation we determined the Eval() function was what I needed. However, the ImageMagick convert function is not visible to the Eval() function, the error I get is “name not found.” Eval() works for the user functions but not variables.
Now, in the past I have used (download other people’s) “class modules” to do things like get to the windows file open dialog box, read and write text files etc. My understanding is they “expose API calls” that otherwise are invisible to Microsoft access.
This is the edge of my knowledge. But isn’t that what I need here?
Is there a way, class module or otherwise, to refer to, reference, alias, or somehow call the ImageMagick convert function in a way to make it visible to Eval() function?
Aha TIA Roger
I have a third party COM object DLL called ImageMagick, I’ve registered the DLL with RegSvr, and I’ve been using it by declaring an object variable and setting a reference within an individual sub. It has a “convert” command that saves a file and responds with a text string with details about the file it just saved. So as such it is a “function” in VBA (right?), I call it like this:
Dim objIM as object
Set objIM = CreateObject("ImageMagickObject.MagickImage.1")
strIMResult =objIM.convert(“c:\File1.jpg”,”c:\File2.jpg”)
That all works.
Now I need to use it with a variable number of files. In the other conversation we determined the Eval() function was what I needed. However, the ImageMagick convert function is not visible to the Eval() function, the error I get is “name not found.” Eval() works for the user functions but not variables.
Now, in the past I have used (download other people’s) “class modules” to do things like get to the windows file open dialog box, read and write text files etc. My understanding is they “expose API calls” that otherwise are invisible to Microsoft access.
This is the edge of my knowledge. But isn’t that what I need here?
Is there a way, class module or otherwise, to refer to, reference, alias, or somehow call the ImageMagick convert function in a way to make it visible to Eval() function?
Aha TIA Roger
Last edited: