Results 1 to 6 of 6

Thread: Convert form code to visual studio 2022

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2022
    Posts
    8

    Convert form code to visual studio 2022

    Hello, im having some trouble to run the code of the attached form in visual studio 2022, can someone be kind to convert and send the form ready to work in visual tudio 2022.

    also i want to know is it possible to use this code in a excel VBA form?

    Best regards, Rodrigo.


    PackRectangles.zip

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Convert form code to visual studio 2022

    Can you post the actual code here, between CODE tags (# symbol on the Reply)? Then we could just view it and see what we can determine from that.

  3. #3
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Convert form code to visual studio 2022

    Quote Originally Posted by Rodmac View Post
    Hello, im having some trouble to run the code of the attached form in visual studio 2022, can someone be kind to convert and send the form ready to work in visual tudio 2022.
    What have you tried? What is the problem you are having? Are there any errors? If you want help then you need to give us something to work with!

    Have you tried creating a new project and adding the attached form to the project?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Convert form code to visual studio 2022

    You need to be specific. There's generally no conversion necessary in VB code simply because you're upgrading your VS version. Almost all code is forwards-compatible, even if it was written in VB.NET 2002. There are often better ways to do things now but the old ways almost always work. You need to tell us EXACTLY what happens and EXACTLY where it happens in the code. Don't expect us all to individually work out stuff that you already know or should already know.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Convert form code to visual studio 2022

    Quote Originally Posted by Rodmac View Post
    i want to know is it possible to use this code in a excel VBA form?
    No. There may be some things that will work similarly but VBA is a different language. You'd be far more likely to be able to use VB6 code directly in VBA but, even then, there will almost certainly be differences.

    Also, is there really such a thing as a "VBA form"? I doubt it. Applications may have their own forms that you can use VBA in but I don't think that VBA has its own concept of a form, the way VB6 and VB.NET do.

  6. #6
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: Convert form code to visual studio 2022

    Quote Originally Posted by jmcilhinney View Post
    …Also, is there really such a thing as a "VBA form"? I doubt it. Applications may have their own forms that you can use VBA in but I don't think that VBA has its own concept of a form, the way VB6 and VB.NET do.
    There is a form of sorts that resembles a .Net Panel

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