none
Method '~' of object '~' failed error, while opening any vbp file in Visual Basic 6.0.

    Question

  • I am facing following problem in one of the conversion project I am working on.

    Whenever I open any VBP file in Visual Basic 6.0, I get Method '~' of object  '~' failed error. After that project compiles without any error i.e I can create either EXE or DLL without any error. Originally, all files are Visual Basic 5.0 vbp files and we are converting Visual Basic 5.0 to Visual Basic 6.0. We will be converting to .Net after converting to VB6. Application uses microsoft access as data storage.

    I am running Windows XP on my machine. 

    I have got .Net 3.5, Jet 3.5 Sp3, Microsoft Office 2003 installed on my machine. 

     

    Thanks,

    Nehal Joshi

    Wednesday, November 10, 2010 5:51 AM

Answers

  • As a side note, if your plans are to convert to .NET, I see no point at all in converting VB5 to VB6 first.

    Moving to .NET will mean your apps will need to be largely rewritten to work correctly with the .NET framework, and converting to VB6 first isn't really going to do you any favors, just take a whole bunch of time for nothing.


    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com
    • Proposed as answer by Cor LigthertMVP Wednesday, November 10, 2010 6:11 PM
    • Marked as answer by Liliane Teng Tuesday, November 16, 2010 8:44 AM
    Wednesday, November 10, 2010 5:01 PM
    Moderator

All replies

  • It's almost six years since my last usage of VB 6, but it seems to me that the ~ is an invalid char to the vb language. Can you debug your app in any way? At which point the app breaks?

     

    Regards


    Matteo Marcianò - founder of ByteStorms
    Wednesday, November 10, 2010 8:42 AM
  • See the below link for VB 6.0 questions. This forum deals primarily with Visual Basic .NET.

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, November 10, 2010 4:36 PM
  • As a side note, if your plans are to convert to .NET, I see no point at all in converting VB5 to VB6 first.

    Moving to .NET will mean your apps will need to be largely rewritten to work correctly with the .NET framework, and converting to VB6 first isn't really going to do you any favors, just take a whole bunch of time for nothing.


    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com
    • Proposed as answer by Cor LigthertMVP Wednesday, November 10, 2010 6:11 PM
    • Marked as answer by Liliane Teng Tuesday, November 16, 2010 8:44 AM
    Wednesday, November 10, 2010 5:01 PM
    Moderator
  • Did not even read that part of the questions when I saw the answers. 

    But I agree with you. (meant for Nehal of course)

     


    Success
    Cor
    Wednesday, November 10, 2010 6:11 PM
  • As a side note, if your plans are to convert to .NET, I see no point at all in converting VB5 to VB6 first.


    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com


    Artinsoft designed the Upgrade Wizard for VB 6.0 so it's probably better to make sure the application functions in this environment first. Plus, there are differences in COM/ActiveX components and design-time licensing requirements for some of the 5.0 ActiveX controls (if used) as well.

    Of course the conversion process will require VS 2008 or VB Express 2008 or earlier versions since the feature was removed from 2010.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, November 10, 2010 6:57 PM
  • Yeah, I know there is the upgrade wizard, but all that really does is make VB6 code "sort of" run in .NET.

    It doesn't take advantage of much of the reason one would want to develop in .NET over VB6 in the first place.

    I'm not saying its a bad product, it is just that most cases really require a majority rewrite for anything more than very simple apps.


    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com
    Wednesday, November 10, 2010 8:37 PM
    Moderator
  • OK, so I guess there is no actual conversion - we just re-write the code. ;-)

    The Upgrade Wizard, just like ActiveX/COM Interop and Interop Forms, is really just a stop-gap method. It allows for the transition of legacy code over time to .NET.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, November 10, 2010 8:54 PM
  • First to update you on the error. If we setup environment with just Visual Basic 6.0 installed on the machine without any newer version of visual studio then this error goes away.

    I agree with you kleinma,  but it was our client requirement. and ofcourse if we plan to use any conversion tool, it is required to have VB6 code, no one actually supports VB5 code to begin with.

    Now moving further, upgrading to .net,  we have analysed some tools and found out that upgrade wizard works just fine as any other tool so converting from VB5 to VB6 was just a waste of time as you rightly said.

    Thanks for all your replies

    Nehal Joshi

     

     

    Wednesday, December 15, 2010 12:11 PM