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

  • Home
  • SEARCH
  • 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 3434776
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:44:23+00:00 2026-05-18T07:44:23+00:00

I am trying to glue a shape to another in Visio using GlueTo Here

  • 0

I am trying to glue a shape to another in Visio using GlueTo

Here is the code

        Set trgObj = Cell.shape.Document.Masters("Trigger").Shapes(1)

        Dim x As shape            
        Set x = ActivePage.Drop(trgObj, flowConnector.CellsU("PinX"), flowConnector.CellsU("PinY"))

        Dim vsoCell1 As Visio.Cell
        Dim vsoCell2 As Visio.Cell
        Set vsoCell1 = x.CellsU("PinX")
        Set vsoCell2 = Application.ActiveWindow.Page.Shapes.ItemFromID(flowConnector.ID).CellsSRC(7, 1, 0)
        vsoCell1.GlueTo vsoCell2

        'The following code I obtained through running a macro in visio
        'Dim vsoCell1 As Visio.Cell
        'Dim vsoCell2 As Visio.Cell

        'The following is the equivalent to x
        'Set vsoCell1 = Application.ActiveWindow.Page.Shapes.ItemFromID(51).CellsU("PinX")

        'The following is the equivalent to flowConnector
        'Set vsoCell2 = Application.ActiveWindow.Page.Shapes.ItemFromID(12).CellsSRC(7, 1, 0)
        'vsoCell1.GlueTo vsoCell2

it returns “Inappropriate target object for this action”, but what is strange is that the code i am using I obtained from recording a macro. I can’t understand why the code works when I record it in a macro but when I use it it doesn’t.
If anyone can offer any help I would greatly appreciate it.

  • 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-18T07:44:24+00:00Added an answer on May 18, 2026 at 7:44 am

    I have figured out the problem instead of using the code which was provided by the macro

    Dim vsoCell1 As Visio.Cell
    Dim vsoCell2 As Visio.Cell
    Set vsoCell1 = x.CellsU("PinX")
    Set vsoCell2 = Application.ActiveWindow.Page.Shapes.ItemFromID(flowConnector.ID).CellsSRC(7, 1, 0)
    

    rather use the following

    Dim vsoCell1 As Visio.Cell
    Dim vsoCell2 As Visio.Cell
    Set vsoCell1 = Application.ActiveWindow.Page.Shapes.ItemFromID(x.ID).CellsSRC(visSectionConnectionPts, 0, 0)
    Set vsoCell2 = Application.ActiveWindow.Page.Shapes.ItemFromID(flowConnector.ID).CellsSRC(visSectionConnectionPts, 1, 0)
    

    where

    visSectionConnectionPts, 0, 0)
    

    0, 0 references cell 0 in the connection points or the x cell

    and

    visSectionConnectionPts, 1, 0)
    

    references the cell 1 or y cell in the connection points

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so I'm trying to use this plugin: http://code.google.com/p/zeroclipboard/wiki/Instructions which basically allows you to set
Trying to set RowHeight like this(in code): dgvTruckAvail.RowTemplate.Height = 48; Doesnt' work. I also
I'm trying to glue together two web services by passing a value from one
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
I'm trying to build the XPCOM component available here: http://mxr.mozilla.org/mozilla-central/source/xpcom/sample/ I tried to compile
Trying to write a windows speech recognition macro. Written using XML and scripting language
I'm no Javascript expert and I'm having problems trying to glue together the various
I'm trying to write a glue function between two data types and I can't
I'm trying to utilize ZeroClipboard (http://code.google.com/p/zeroclipboard/wiki/Instructions) to copy the current URL to the user's
Trying to create an SSIS package to process a Datacube. Using SMS 2008, I've

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.