Results 1 to 2 of 2

Thread: Building a 64bit interop for VBA

  1. #1

    Thread Starter
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Building a 64bit interop for VBA

    Hi Folks

    I'm out of my comfort zone here and likely doing something stupid.

    I have inherited an application that has VBA (including the IDE) embedded in it. For performance reasons this was originally done using the 32 bit version but we're increasingly hitting the 4Gb memory cap so we need to produce a 64bit version. To do that I need to build (among other things a 64bit interop of VBE7.dll).

    From what I'm reading (both online and in the notes left by the original dev) I should just be able to install the VBA sdk, use that to install the appropriate run times and then use TLBIMP to build the interops from the resultant dlls. The problem is that, despite wat the docs say, including the chm that's installed by the sdk installer, this only seems to create 32 bit versions of the dlls and I cannon then build a 64 bit interop. Here are the steps I'm carrying out and what I'm observing:-

    1. I run the installer. This creates folder C:\Program Files (x86)\Microsoft SDKs\VBA\v7.1 which contains a chm and
    2. The chm in the above folder confirms the developers notes that I need to run VBA71 and VBA71_1033 in VBARedist/Releases/X** folder with ** being the bit version I want (86 or 64). The chm specifically talks about supporting both versions so I'm confident I'm at least using the right SDK installer.
    3. I run the above two files under the x64 path and it creates C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6 and C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA7.1. However, it's not creating dlls in those folders. The only content is some chm files that basically contains the VBA documentation.
    4. If I run the above two files from under the x86 path it does create the dlls but when I then try to build the interop "tlbimp "C:\Program Files (x86)\Common Files\microsoft shared\VBA\VBA7.1\VBE7.DLL" /out:interop.vba7.dll /machine:X64 /strictref:nopia /silence:3011" it fails with the following error "TlbImp : error TI2010 : A single valid machine type compatible with the input type library must be specified."

    Step 4 is hardly surprising because, presumably, it's trying to build a 64 bit interop from a 32 bit dll. So I believe the failing is in step 3. I was expecting running the file under the x64 path to create the necessary dlls but it doesn't

    I'm trying to upload the sdk installer so people can see what I'm on about (I believe it was originally downloaded from MS and should be safe but it looks like it's probably since been withdrawn as I can't find it. Certainly I've run it several times so I'm confident it's safe) but the forum's playing up at the moment and won't let me. Will keep trying.

    So where I'm at is, has anyone else embedded VBA, including the IDE into an app? How did you go about it? Does the above sound right or am I missing something?

    Edit> unfortunately it doesn't look like the sdk installer is available for download any more but it was called "Visual Basic for Applications SDK v71.msi", just in case any of you guys still have access to it.
    Last edited by FunkyDexter; Jan 6th, 2021 at 09:59 AM.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  2. #2
    Lively Member
    Join Date
    Dec 2016
    Posts
    86

    Re: Building a 64bit interop for VBA

    where do you download the VBA7.1-SDK? Can you share it to me?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width