Between the two lines, type the following code so that your subroutine looks like this:
Public Sub HelloVisio()
Dim s As String
s = "Page: " & Visio.ActivePage.Name
s = s & " has " & Visio.ActivePage.Shapes.Count
s = s & " shapes."
MsgBox s
End Sub
A few notes about this:
s is a variable, which you declared to be a string in the first line, using the
Dim statement. You then built
s into a message by
concatenating bits of text. For strings, you use the
& operator to add chunks of text together. So
”Visio” & “Guy” = “Visio Guy”. Finally, you invoke a pop-up message box to display the text stored in
s. The code in HelloVisio will pop up a message displaying the name of the active page, and the number of shapes it contains.