+ Reply to Thread
Results 1 to 9 of 9

connecting Shapes by reading table

  1. #1
    Registered User
    Join Date
    07-08-2019
    Location
    Porto
    MS-Off Ver
    2016
    Posts
    2

    connecting Shapes by reading table

    Hello, i'm trying to create a macro that reads a solution matrix data, and represent the solution visually by connecting shapes using connectors.

    In sheet1 i have the shapes i need to connect and in sheet2 i have the data matrix that needs to be read. The connection needs to have a beginning, represented by "reflow1" matrix and an ending represented by "reflow2" matrix.

    the code is in module2 of VBA, and is currently working, though the assignments are not correct.( it should assign k=* between reflow1 and reflow2 in the corresponding smd). For example k=6 should create a connection between smd 21 and smd 6.

    I have tried several times, but can't get the connections right. Any help would be appreciated.

    Attachment 631211
    Attachment 631212
    Last edited by amflfalcao; 07-08-2019 at 08:02 AM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: connecting Shapes by reading table

    Hi, welcome (bemvindo) to the forum,
    I'll take a look and see if I can help, let met see if I understand your question first.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: connecting Shapes by reading table

    Can you explain what smd stands for?
    Why did you not name every rectangle smd and the number, smd 18 you named Rectangle 1 why not directly smd1 as shape, makes it easier to address?
    How do you know the smd(18) =1 if you just name that one smd1 or smd01 will make it easier than an array and you have to think it all out.
    Think it over

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: connecting Shapes by reading table

    Correction, smd will not be accepted since its a column, but you coud think of something else like rect1 and then the caption smd1 or 01?

  5. #5
    Registered User
    Join Date
    07-08-2019
    Location
    Porto
    MS-Off Ver
    2016
    Posts
    2

    Re: connecting Shapes by reading table

    Smd is the designation of a machine. They are represented according to a layout I have. SMD(18) = 1 because it was the 1st shape drawn manually. The names (rectangle *) were automatic given. The layout will stay the same, but i have several different solution to analyse, therefore i wanted to automatize the connection process. I'll try to think it over and post here if i can't move forward.

    Thx for the feedback!

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: connecting Shapes by reading table

    Okay, understood, but why not give the shapes the same number makes it easier to relate to.
    So smd 18 rectangle 18 then you can relate easier than the then to think 18? with rectangle?

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: connecting Shapes by reading table

    Now the rectangles have the same name as the machine
    Attached Files Attached Files

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: connecting Shapes by reading table

    I played around with my idea and it works quite well. I removed the smd array and clear the connection lines before starting.
    Give it a try
    Attached Files Attached Files

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: connecting Shapes by reading table

    I noticed you marked this post SOLVED, but did it work for you?
    You could at least have the decency to say something like thank you obrigado.

+ 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. Connecting Shapes with Arrowed Lines - Debugging help! - Code attached
    By Snaybot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-13-2016, 04:42 AM
  2. [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
  3. Problem with connecting Freeform shapes
    By ultraserenejoe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2016, 01:47 AM
  4. Shapes, reading text into them
    By malcmail in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2015, 11:05 AM
  5. COMPLEX - connecting data between 2 table
    By srdalxMI in forum Excel General
    Replies: 4
    Last Post: 07-15-2011, 03:55 AM
  6. Connecting data table to spreadsheet via formula
    By rex28 in forum Excel General
    Replies: 3
    Last Post: 05-08-2010, 07:17 AM
  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

Tags for this Thread

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