Results 1 to 13 of 13

Thread: Converting VB6 add-in

  1. #1

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,343

    Converting VB6 add-in

    I have the code for a VB6 add-in that I wrote many years ago. It was (of course) written in a 32-bit environment and it added certain useful functions to the Excel toolbar. Those functions brought up forms that I then used to enter text into the code in my workbook's macros. I'd like to convert or rewrite that add-in so that I can use it in 64-bit Excel. How would I go about doing that?

  2. #2
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,576

    Re: Converting VB6 add-in

    See TwinBasic and pray.
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  3. #3
    Banned
    Join Date
    Nov 2011
    Posts
    7,803

    Re: Converting VB6 add-in

    You wrote it in VB6 not VBA? VBA is 64 bit I believe so maybe you might find the answer there. My experience with VBA is very limited so I can't say for sure.

  4. #4

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,343

    Re: Converting VB6 add-in

    Quote Originally Posted by Niya View Post
    You wrote it in VB6 not VBA? VBA is 64 bit I believe so maybe you might find the answer there. My experience with VBA is very limited so I can't say for sure.
    Yes VB6. I initially wrote it for VB6 which has a UI similar to Excel and with a few simple changes I made one for 32 bit Excel since (I think) at that time Excel 64 bit didn't exist.

  5. #5
    Member
    Join Date
    May 2021
    Posts
    32

    Re: Converting VB6 add-in

    In trying to improve in VBA, I end up converting projects written in VB6 to VBA fairly frequently. It really all depends on what it is that you add-in tries to do. If it's just a matter of converting API declarations, then one source of information is the MS file. If your addin uses controls such as listview, treeview, etc., then it's worth checking out this post if you don't already have it set up on your system.

  6. #6

  7. #7

  8. #8
    Member
    Join Date
    May 2021
    Posts
    32

    Re: Converting VB6 add-in

    VBA doesn't compile DLL files. For that, you could try using TwinBasic which I've started exploring and looks very promising.

  9. #9
    Banned
    Join Date
    Nov 2011
    Posts
    7,803

    Re: Converting VB6 add-in

    TwinBASIC is currently in BETA. While it is certainly very mature in it's capabilities I'd be weary of using it for production code so soon.

  10. #10
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    3,320

    Re: Converting VB6 add-in

    Depending on what that DLL is supposed to do, and if any other Programs access it/depend on it, it should be fairly easy to convert it to VBA

    In general: converting vb6-anything to VBA is not that hard, as long as you don't use any third-party-anything (dll, controls etc.), or any special properties
    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  11. #11

  12. #12
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,576

    Re: Converting VB6 add-in

    Quote Originally Posted by MartinLiss View Post
    yereverluvinuncleber. Have you ever used TwinBasic? I emailed them describing what I want to do.
    The developer is very approachable and really engaged with his task of bringing VB6 into the 21st century. There is also the other potential option RADBasic. I'd keep an eye on those two if you want to create 64bit compilable standalone VB6-type apps. If you are developing for Excel then it might be wise to migrate to VBA. Note that Wayne Phillips (TwinBasic) has an eye on capturing the VBA market too so VBA isn't a bad idea.
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  13. #13
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    3,320

    Re: Converting VB6 add-in

    OK, let's get something out of the way:
    Is this "Add-In" of yours a (vb6) DLL or is it an Excel Add-In (xla/xlam)?
    I'm asking for the File-Format
    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

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