Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7173417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:49:13+00:00 2026-05-28T15:49:13+00:00

Is their any way to find out if two textboxes or shapes overlap using

  • 0

Is their any way to find out if two textboxes or shapes overlap using VBA in PowerPoint (2007)?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:49:14+00:00Added an answer on May 28, 2026 at 3:49 pm

    This should get you going.

    It still needs to account for boundary cases:

    Do two shapes just touching count as an overlap or not?

    What about line thickness? The shape size doesn’t include the line thickness, but a thick line might cause the shapes to visual overlap.

    Function ShapesOverlap(oSh1 As Shape, oSh2 As Shape) As Boolean
        Dim Shp1Left As Single
        Dim Shp1Right As Single
        Dim Shp1Top As Single
        Dim Shp1Bottom As Single
    
        Dim Shp2Left As Single
        Dim Shp2Right As Single
        Dim Shp2Top As Single
        Dim Shp2Bottom As Single
    
        Dim bHorizontalOverlap As Boolean
        Dim bVerticalOverlap As Boolean
    
        With oSh1
            Shp1Left = .Left
            Shp1Right = .Left + .Width
            Shp1Top = .Top
            Shp1Bottom = .Top + .Height
        End With
    
        With oSh2
            Shp2Left = .Left
            Shp2Right = .Left + .Width
            Shp2Top = .Top
            Shp2Bottom = .Top + .Height
        End With
    
        ' do they overlap horizontally?
        If Shp1Left > Shp2Left Then
            If Shp1Left < Shp2Right Then
                bHorizontalOverlap = True
            End If
        End If
        If Shp1Left < Shp2Left Then
            If Shp1Right > Shp2Left Then
                bHorizontalOverlap = True
            End If
        End If
    
        ' do they overlap vertically?
        If Shp1Top > Shp2Top Then
            If Shp1Top < Shp2Bottom Then
                bVerticalOverlap = True
            End If
        End If
        ' do they overlap vertically?
        If Shp1Top < Shp2Top Then
            If Shp1Bottom > Shp2Top Then
                bVerticalOverlap = True
            End If
        End If
    
        ShapesOverlap = bHorizontalOverlap And bVerticalOverlap
    
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is their any way of counting number of django logins? The last_login field of
Is there any known way of listing the WMI classes and their properties available
Didn't find any from their website. I mostly just trying to see which one
I'm trying to figure out a way to find who a user mentions the
Question This question was originally to find out if anyone knows of a way
Is their any profilers that support Silverlight? I have tried ANTS (Version 3.1) without
Is their any notifier which let's you add specific build in the notifier. Right
Does iPhone support XML-RPC, Is their any open source framework which I can use?
When users input their images, their images are any size. I want to be
Are there any Java VMs which can save their state to a file and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.