i'm creating and testing a UserForm where user can add the shapes and add the predefined Shape Data Value to the Shape Data. The Shape Data name is "Element" as you can see the image below.
Dim vsoRound As Visio.Shape
Dim cell As Visio.cell
If (CheckBox1.Value) Then
Application.ActiveWindow.Page.Drop Application.Documents.Item("MS Icons.VSSX").Masters.ItemU("Round"), 5, 5
Set vsoRound = Application.ActiveWindow.Page.Shapes.ItemU("Round")
vsoRound.CellsU("ELement").FormulaU = """Fan"""
The value for this Shape Data is Fan. However it break at the last line of the code.
**Update: I added the error message.
As workaround you can delete unused master Square in Visio Shape Test.vssm before drop master with same name from stencil MS Icons.vssx via your code!