+ Reply to Thread
Results 1 to 4 of 4

Connecting Shapes with Arrowed Lines - Debugging help! - Code attached

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    Cali or philly
    MS-Off Ver
    Excel 2003
    Posts
    60

    Connecting Shapes with Arrowed Lines - Debugging help! - Code attached

    I want to create a macro that connects arrowed lines from the shape described in A column to the shape described in B Column

    where Column A is current state and B is the Target State

    So A1 to B1
    A2 to B2
    A3 to B3......

    As of right now I have a semi-working code

    Please Login or Register  to view this content.
    It keeps bugging out at

    If Shp.TextFrame.Characters.Text = iTxtBoxVal Then

    When ever I apply my other Macro to create the shapes from Column A and some times it bugs out randomly

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Connecting Shapes with Arrowed Lines - Debugging help! - Code attached

    Hi Snaybot,

    Your errors only appear to be random, they are probably quite systematic. You are probably trying to obtain text from Shapes that do not support text, such as a line.

    There are several ways to approach the problem. The simplest (but probably not the best code) is as follows (tested and working in Excel 2003):
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Registered User
    Join Date
    05-06-2014
    Location
    Cali or philly
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Connecting Shapes with Arrowed Lines - Debugging help! - Code attached

    It works perfect thanks!

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

    Re: Connecting Shapes with Arrowed Lines - Debugging help! - Code attached

    The shape object has a property you can use to ensure it has text

    Please Login or Register  to view this content.
    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)

Similar Threads

  1. [SOLVED] Connecting Lines with according Shapes - Flow Chart creator (Code inside)
    By Snaybot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-09-2016, 02:42 PM
  2. Problem with connecting Freeform shapes
    By ultraserenejoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2016, 01:47 AM
  3. Connecting two lines of data
    By DeborahClark in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-26-2015, 05:21 PM
  4. No connecting lines in a scatter graph
    By katiemc in forum Excel General
    Replies: 4
    Last Post: 08-08-2014, 05:13 PM
  5. Connecting lines of different series
    By wlsiah1 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-06-2013, 11:01 PM
  6. Line Graphs, Lines Not Connecting
    By mkoch in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-30-2006, 07:29 PM
  7. Creating shapes dynamically and connecting them
    By jo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-18-2006, 11:10 AM

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