+ Reply to Thread
Results 1 to 8 of 8

As New CRect not available?

  1. #1
    Registered User
    Join Date
    10-02-2008
    Location
    Michigan
    Posts
    68

    As New CRect not available?

    I have this defined in a VB6 program that I am moving to VBA. There does not seem to be a CRect object available, is there a library I can load to use it?

    Private DragRect As New CRect

    Thanks,
    Bob

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: As New CRect not available?

    That's not a VBA thing. What are you trying to do?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    10-02-2008
    Location
    Michigan
    Posts
    68

    Re: As New CRect not available?

    Trying to move and resize controls at runtime. I have code to do it in VB6 but it wont work in VBA, got any ideas on how to do it?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: As New CRect not available?

    Dunno. Maybe

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: As New CRect not available?

    Hello excelbobabc,

    The CRect object exists in Visual Studio but does not have a VBA analog. Since you are migrating the code, you would have to post your VB6 code before a solution could be proposed.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  6. #6
    Registered User
    Join Date
    10-02-2008
    Location
    Michigan
    Posts
    68

    Re: As New CRect not available?

    I need to move and resize the controls with the mouse

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: As New CRect not available?

    It's quite tricky to convert code we can't see.
    Everyone who confuses correlation and causation ends up dead.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485

    Re: As New CRect not available?

    Are you resizing controls when the userform changes size? If so this may help.
    http://www.andypope.info/vba/Anchor.htm
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1