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,427

    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
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: Converting VB6 add-in

    See TwinBasic and pray.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

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

  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    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.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #4

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

    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
    Lively Member
    Join Date
    May 2021
    Posts
    95

    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
    Lively Member
    Join Date
    May 2021
    Posts
    95

    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
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    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.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

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

    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
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    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
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    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.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle 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
    4,415

    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
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    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