+ Reply to Thread
Results 1 to 2 of 2

Lauch Visio Command in Excel

  1. #1
    Registered User
    Join Date
    01-12-2016
    Location
    france
    MS-Off Ver
    2013
    Posts
    0

    Lauch Visio Command in Excel

    Hi Guys,

    I've got this macro working in visio, but i'd like to launch from Excel. Can you write the code i have to change.
    I think I have to add some "Dim" but I don't know how to write

    Sub ConnectRectangles()

    ' need a couple shapes to connect.
    Dim testShape1 As Visio.Shape
    Dim testShape2 As Visio.Shape

    ' draw the shape object on the page
    Set testShape1 = Visio.ActivePage.DrawRectangle(1, 1, 2, 2)
    Set testShape2 = Visio.ActivePage.DrawRectangle(1, 9, 2, 10)

    ' define the selection object we will use to connect em.
    Dim testSelection As Visio.Selection

    ' select the shapes via the selection object
    Set testSelection = Visio.ActivePage.CreateSelection(visSelTypeAll)

    ' connect em all
    testSelection.ConnectShapes

    End Sub

    THX

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello Captainkalak,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Link from Excel to MS Visio
    By hege11 in forum Excel General
    Replies: 15
    Last Post: 10-11-2015, 07:43 PM
  2. Replies: 0
    Last Post: 10-07-2013, 10:24 AM
  3. Replicate a function from MS Visio in Excel?
    By camstar1 in forum Excel General
    Replies: 1
    Last Post: 08-26-2013, 09:58 AM
  4. World of Excel and Visio!
    By shanali in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-01-2013, 10:52 AM
  5. excel (col & row) to Visio (drawing)
    By sanlen in forum Excel General
    Replies: 0
    Last Post: 01-12-2011, 11:47 PM
  6. excel to visio transfer
    By robert111 in forum Excel General
    Replies: 2
    Last Post: 07-16-2007, 11:13 AM
  7. Ms Visio/excel
    By PoolMan in forum Excel General
    Replies: 8
    Last Post: 05-03-2007, 06:16 AM
  8. [SOLVED] exporting excel data into visio
    By Matt21 in forum Excel General
    Replies: 0
    Last Post: 01-11-2005, 06:06 PM

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