Maximum string size in shapesheet user field

Started by Visisthebest, January 04, 2021, 01:30:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visisthebest

I see that a shape data cell/field can store a string of up to 64kb:
https://bvisual.net/2015/07/24/formatting-shape-data-in-visio/

Can a shapesheet user cell also store a 64kb string (obviously a 64kb string as a result, not a formula although that would be impressive for a formula length! 8) )

Thank you for your help!
Visio 2021 Professional

Visisthebest

Yup it is 64kb you can verify this with the code below.

(select a shape with the User.visVersion cell you can add, Microsoft's Basic Block shapes have this field in Visio 2019 by default)


Sub CramALargeStringIntoUserCell()

Dim zerototen As String

zerototen = "0123456789"

Dim largestring As String

Dim Counter As Long

For Counter = 1 To 6553

largestring = largestring & zerototen

Next Counter

Dim SomeCell As Visio.Cell

Set SomeCell = Application.ActiveWindow.Selection(1).Cells("User.visVersion")

SomeCell.FormulaForce = Chr(34) & largestring & Chr(34)

End Sub
Visio 2021 Professional