News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Create a Visio flowchart from Excel table

Started by FryGirl, March 19, 2021, 04:19:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FryGirl

Hi Surrogate,

Yes, I added the reference to the library in the VBE.  Wasn't sure which to use, so I checked all three.  Type Library, Save As Web Type Library, and Visio Viewer 16.0 Type Library.

How can the code be changed to late binding?

Surrogate

#16
Quote from: FryGirl on March 20, 2021, 10:16:16 PM
Wasn't sure which to use, so I checked all three.  Type Library, Save As Web Type Library, and Visio Viewer 16.0 Type Library.
Just cant find all these libraries as loaded (checked)

I use Visio 2019 Professional ie Visio 16 Type Library, like as MS Visio 2016.
Quote from: FryGirl on March 20, 2021, 10:16:16 PM
How can the code be changed to late binding?
if you use late binding, you dont need add references, but you need use values instead Visio's application system constants
    AppVisio.Documents.AddEx "", 0, 0
    AppVisio.Documents.OpenEx "C:\Users\1212C\Documents\My Shapes\Fry.vssx", 0 + 4  'Add Basic Stencil

https://docs.microsoft.com/en-us/office/vba/api/visio.vismeasurementsystem
https://docs.microsoft.com/en-us/office/vba/api/visio.documents.openex

FryGirl

Hi Surrogate,

That worked great by updating to the constants.  Thanks.

Croc

FryGirl, If you insert the following lines at the end of the DropStringOfBoxes procedure, then Visio will make the flowchart beautiful :)
   ...
    AppVisio.ActiveWindow.DeselectAll
    AppVisio.ActivePage.PageSheet.Cells("PlaceStyle").FormulaForceU = "1"
    AppVisio.ActivePage.PageSheet.Cells("RouteStyle").FormulaForceU = "5"
    AppVisio.ActivePage.Layout
   
    Set AppVisio = Nothing
End Sub

FryGirl

Wow, thanks Croc.  More than I could have expected.

Appreciate all the time and help from everybody.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 237 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1094KB.
Tokens: post-login.
Cache hits: 13: 0.00186s for 26,767 bytes (show)
Cache misses: 2: (show)
Queries used: 15.

[Show Queries]